Ef and Dapper.net in one solution

dapper entity-framework

Question

Is there a reason why I couldn't use both EF and Dapper.NET in my solution?? EF like to use due to the flexibility of the programming , but when I need to select several large amounts of data then used the Dapper. Can it lead to any conflict???

Accepted Answer

As long as you don't cross the streams, you should be fine. In fact, I strongly suggest using more than one tool; use EF when you want to use features that are key to EF, and dapper when you need simpler data access and care more about performance than complexity / flexibility. Forcing a single tool to do things it doesn't excel "because we use Tool X" is usually where projects go wrong.



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