Set identity specification set to false in entity framework

By | November 9, 2017

Set identity specification set to false in entity framework

public class OurContext : DbContext 
{    
   protected override void OnModelCreating(DbModelBuilder modBuilder)  
   {        
     modBuilder.Conventions.Remove<StoreGeneratedIdentityKeyConvention>();    
   }
}

 

 

Leave a Reply

Your e-mail address will not be published. Required fields are marked *