When using Entity Framework Migrations, the DbMigration
base class has a Sql method which takes parameters in an anonymous object
I cannot for the life of me figure out how to use it.
Sql(@"
UPDATE dbo.SlideSets
SET Name = @Name,
", false, new {
Name = "Foo"
}
);
Results in the error
System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@Name"
What's the correct syntax of this statement?