entity framework - How to use migrations after adding a Key attribute to a property? -
entity framework - How to use migrations after adding a Key attribute to a property? -
package manager console:
one or more validation errors detected during model generation:
p6.dal.password: : entitytype 'password' has no key defined. define key entitytype. password: entitytype: entityset 'password' based on type 'password' has no keys defined.
class password:
public class password { [key] public int passwordid { get; set; } public string passwordname { get; set; } public string isvalid { get; set; } public virtual person person { get; set; } }
try using -force this:
update-database -verbose -force -configurationtypename configuration you can set instead of "configuration" configuration name.
there's chance reply here help you:
entity framework 6.1 delete column
entity-framework asp.net-mvc-5
Comments
Post a Comment