title: CLR Trigger Unresolved reference error
body: <p>I am attempting to create a CLR Trigger that alters a column value to upper case.
  But when I try to build the file I get the following:</p>
  
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error       SQL71501: Trigger: [dbo].[UpperTrigger] has an unresolved reference to object [dbo].[tblAirline].   TravelSight \\mac\home\documents\visual studio 2015\Projects\TravelSight\TravelSight\obj\Debug\TRAVELSIGHT.generated.sql    33  
  </code></pre>
  
  <p>My clr code is as follows:</p>
  
  <pre><code>using System;
  using System.Data;
  using System.Data.SqlClient;
  using Microsoft.SqlServer.Server;
  
  public partial class Triggers
  {
      // Enter existing table or view for the target and uncomment the attribute line
      [Microsoft.SqlServer.Server.SqlTrigger(Name = "UpperTrigger", Target = "[dbo].[tblAirline]", Event = "AFTER INSERT, UPDATE")]
      public static void UpperTrigger ()
      {
          // Open connection for context
          SqlConnection conn = new SqlConnection();
          conn.ConnectionString = "Context Connection=true";
  
          // Create command object
          SqlCommand command = new SqlCommand();
          command.Connection = conn;
  
          // Create string that defines sql statement
          string sql = 
           "Update tblAirline " +
          "SET AirlineName = UPPER(AirlineName) " +
          "WHERE AirlineID IN(SELECT AirlineID FROM Inserted)";
          command.CommandText = sql;
  
          // Exec command object
          command.ExecuteNonQuery();
  
          // Close connection object
          conn.Close();
  
      }
  }
  </code></pre>
  
  <p>What have I missed out here? </p>