Reputation: 18150
The following code in my DbContext class causes an error when I try to add a migration
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<TaskExt>()
.Map<TaskDespatch>(m => { m.Requires("WorkStationID").HasValue(160).HasColumnType("int"); });
base.OnModelCreating(modelBuilder);
}
What am I missing?
Upvotes: 1
Views: 583
Reputation: 18150
The field name was "WorkstationID" in the database. Correcting the "S" to be lower case stopped the message.
Upvotes: 1