We can globally turn off this feature by removing
StoreGeneratedIdentityKeyConvention Convention as below,
public class OurContext : DbContext
{
protected override void OnModelCreating(DbModelBuilder modBuilder) { modBuilder.Conventions.Remove<StoreGeneratedIdentityKeyConvention>();
}
}
{
protected override void OnModelCreating(DbModelBuilder modBuilder) { modBuilder.Conventions.Remove<StoreGeneratedIdentityKeyConvention>();
}
}
No comments:
Post a Comment