Error message: ModelValidationException System.Data.Entity.EdmEntityType: EntityType ‘blah’ has no key defined. Define the key for this EntityType

There are some simple fixes you can apply when this message occurs. // reason 1 – You’ve forgotten to include a key. All EF models need a key  public class Item  {      public string name { get; set; }      // just uncomment the line below      // public int Id […]