Exemplo n.º 1
0
 public void InsertDataOperation_throws_for_missing_entity_type()
 => Assert.Equal(RelationalStrings.DataOperationNoTable("dbo.People"),
                 Assert.Throws <InvalidOperationException>(() =>
                                                           Generate(
                                                               CreateGotModel,
                                                               new InsertDataOperation
 {
     Table   = "People",
     Schema  = "dbo",
     Columns = new[] { "First Name" },
     Values  = new object[, ] {
         { "John" }
     }
 })).Message);
Exemplo n.º 2
0
 public void InsertDataOperation_throws_for_missing_entity_type()
 => Assert.Equal(
     RelationalStrings.DataOperationNoTable((string.IsNullOrEmpty(Schema) ? null : Schema + ".") + "Persons"),
     Assert.Throws <InvalidOperationException>(
         () =>
         Generate(
             CreateGotModel,
             new InsertDataOperation
 {
     Table   = "Persons",
     Schema  = Schema,
     Columns = new[] { "First Name" },
     Values  = new object[, ] {
         { "John" }
     }
 })).Message);