Reputation: 4665
Choosing the Code First approach or the Database First approach with Entity Framework Core for my case is looking confusing from best approach point of view.
I have an existing database with some complex stored procedures.
If I choose the Database First approach, will it be good from performance point of view?
If I choose the Code First approach, can I map the existing Stored Procedures with Entities using Entity Framework Core? If this is possible, are there any disadvantages?
Upvotes: 0
Views: 78
Reputation: 6367
We can't map them yet, but we can call them:
Public Class Sample
Private Sub SpTest()
Dim oContext As SchoolContext
Dim oStudents As List(Of Student)
oContext = New SchoolContext
oStudents = oContext.Students.FromSql("GetStudents 'Bill'").ToList
End Sub
End Class
There are some limitations:
You can find more info here:
http://www.entityframeworktutorial.net/efcore/working-with-stored-procedure-in-ef-core.aspx
As to your performance question, I'd suggest doing some testing and benchmarking.
Upvotes: 1