1

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?

Kirsten
  • 15,730
  • 41
  • 179
  • 318

1 Answers1

1

The field name was "WorkstationID" in the database. Correcting the "S" to be lower case stopped the message.

Kirsten
  • 15,730
  • 41
  • 179
  • 318