Using EF and other Dapper ORM in same project - drawbacks

asp.net asp.net-identity asp.net-mvc dapper projects-and-solutions

Question

I am about to start a new project and I have a little dillema. App require asp identity for security and dapper as orm. My plan is to use default asp web app template with identity that use entity framework and for all business data access use dapper. This means that I will use dapper sometimes to get something from identity tables also (like username for some user).

Another approach is to change identity to use dapper but I think that I am not skilled enough to do that and this probably would be bad for project later.

So what could be drawbacks for architecting app like this?

Accepted Answer

There are no drawbacks. ORMs are tools. You are allowed to use more than one tool - pick appropriate tools for each job. If you were building a house you wouldn't try to use one hammer for all hammer-related jobs, or one screwdriver for all screw related jobs.

Just keep some isolation between them - EF models don't always play nicely with other tools.



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why