public class Band [Key] public longpublic DbSet<Band> bands { get; set; }PM> add-migration migration_1
Output: The entity type 'Band' requiresa primarykey to be defined<
public class Ejercicios : BaseModel private int _TipoEjercicio; public int TipoEjercicio}现在我的问题是当我试图运行Add-Migration,抛出
System.InvalidOperationException: The entity type 'Ejercicios' requiresa primarykey to be defined.