I have a Entity Framework model set up with text templates to generate the code. However, one of them creates the DBContext containing an OnModelCreating<
DBContext
OnModelCreating<
Possibly your problem is that the connection string you're using is a standard SQL Server one rather than the Entity Framework one. See this answer.