Fares Ayyad

Fares Ayyad

  • NA
  • 235
  • 74.3k

Using entity framework and native ado.net in same project

Oct 26 2017 2:34 AM
Hello 
 
I'm wondering if i can work with two different data access in the same project? 
 
this is the scenario: 
 
I'm working in a web application using .net core as back-end and Angular 2 as front-end, 
now in my SQL database i use alot of Stored Procedures, i face a difficulty to use Stored Procedure and views using [Code-First/ DB first], and i used to work with native Ado.net sql commands in my previous project. 
 
So my problem arised when i need to use the MS Identity for authentication and authorization, i figured out that using identiy worked with Entity Framework, Identity will use DBContext to query database using connection string. 
 
My point is if i use the same connection string that is used by Identity framework to query my database with native Ado.net sq commands.
 
Is this a bad practice or it's slows the performance, is there any conflict will appeare if i use two data access pointing to the SAME database for the same project.