0

If you look in the source there's a solid SqlCommand in there. (Why do I need to even look in the source to find this out?)

Doesn't this in part defeat the point of using Entity Framework. i.e. to abstract away the database?

Couldn't they have a least made the bits that need raw SQL pluggable so that they could be replaced with for example a Postgresql implementation?

Ian Warburton
  • 15,170
  • 23
  • 107
  • 189
  • Link to the exact usage in code? – trailmax Apr 15 '15 at 21:20
  • It uses SqlCommands to create the tables that Identity uses. Its the principle though. An EF database context implies that you can use any compatible provider but in this case its tied to MSSQL. – Ian Warburton Apr 15 '15 at 22:19
  • There's no `SqlCommand` in here https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNet.Identity.EntityFramework/IdentityDbContext.cs The only `builder.ForSqlServer().UseIdentity();` statement is a temporary bug fix they are planning to solve it. – Shoaib Shakeel Apr 16 '15 at 04:52
  • How about the base class? – Ian Warburton Apr 16 '15 at 13:59
  • I'm not sure now. When I go to definition using Resharper on IdentityDbContext there's a method on IdentityDbContext called VerifyColumns that takes a SqlCommand. – Ian Warburton Apr 16 '15 at 14:04

0 Answers0