I'm trying to figure out to store .NET objects in SqlServer to minimize binding effort. Example:
public DbSet<Assembly> Assemblies { get; set; }
The code above results in the following exception:
'The entity type 'Assembly' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types
Is there a way to consider the name of the Assembly primary key?
Aucun commentaire:
Enregistrer un commentaire