4

I'm firing up an MVC project in which I'd really like to use Dapper as my ORM, as I like to be as close to the database as possible for performance and SQL tweaking reasons, yet still have the power of an ORM. However there is one big snag, and that's identity & role management.

MVC scaffolding makes this nice, quick, and easy to implement but it relies on Entity Framework. I need to be able to implement roles as well as accept logins from third party services i.e. Facebook & Twitter. Unfortunately I don't have the time or yet the aptitude to rewrite all of that from scratch.

To date, I have yet to find a concise guide or tutorial on how to completely replace Entity Framework inside of the identity scaffolding. I don't want to get wrapped around the axle, while trying to reinvent the wheel.

So with that in mind, I'm considering just leaving the EF Identity code in place, and then for any other data access needs using Dapper. But I wonder if this comes with any known issues or "gotchas" that could trip me up.

Does anyone see any issues with building a MVC project based on this approach?

  • 4
    I'm considering just leaving the EF Identity code in place, and then for any other data access needs using Dapper -- That sounds like an excellent approach. – Robert Harvey Jul 20 '15 at 13:48
  • replace Entity Framework for identity\role management was quite hard task for me. this tutorial may be helpful for you. – Disappointed Jul 20 '15 at 14:48
  • Your approach should be fine but if you're interested here's a nice tutorial on replacing EF in ASP.Net Identity with Dapper. blog.markjohnson.io/… – Haohmaru Dec 21 '15 at 12:21
  • What did you end up doing - what would you recommend? This should be way easier I mean who uses EF in production? – niico Dec 26 '16 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.