Last post Feb 04, 2020 10:53 AM by DA924
Feb 04, 2020 07:39 AM|SimonBunya|LINK
I have another issue in ASP.NET Core, I use Scaffold-DbContext "Server=.;Database.., to import entity models of my database in SQL, and I use database first approach, but the
challenge is I can’t Import Stored Procedures or Functions to use them as entity models, like I used to in ADO.NET models in ASP.NET MVC.
Please advise on how to use stored procedures in ASP.NET Core.
Many thanks in advance
Feb 04, 2020 10:28 AM|l.laxmikant|LINK
You must have a Context class to connect to database in Entity Framework. Once your context class is ready you may call stored proc like
var name = "Sara";
var context = new SchoolContext();
var studentList = context.Students
Feb 04, 2020 10:53 AM|DA924|LINK
Bing and Google are you're friends.