The text of this article is not in this database — only its details are. Read it on the old site: How To Call Stored Procedure In Entity Framework
20 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: How To Call Stored Procedure In Entity Framework
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Tahir AnsariPosted Dec 21, 2022, 12:31 PM
Please share the stored procedure with mutliple paramaters using EntiyFramework
RobertoCarlos MelgarPosted Aug 20, 2018, 4:31 PM
Thank you very muchplease can you provide us with an example for an insert procedureexampleinsertcustomer @ param1 nvarchar, @ param2 nvarchar, @ param3 datetime please, I just can not find out what is the best way to do it this with sql server and mvc 5 and entity framework Thank you, Bolivia
Ajay AntalaPosted Nov 28, 2017, 7:50 AM
Also useful this article but how to use without using this funcation how can i do in mysql (c#).please help me.
Ajay AntalaPosted Nov 28, 2017, 7:47 AM
Hi, I'm using entity framework in asp.net and now i want to call mysql stored-procedure,ok it's call but it return int valu(0-1),but i want to return list,that use to bind gridview. search in google but only suggestion import funcation and call it,but my requirement is call without use this function,how to solve this query,,any one expert can suggestion me, Thank you.
Vinay PhadkePosted Jun 14, 2016, 10:36 AM
Thanks for the nice article. I have a question- Why does SP called from EF(I'm using version 6.1.3) takes time as compared toSP execution time of SQLCommand's ExecuteNoNQuery() & Datareader? I'm making an Async call using EF like below- public async Task<IList<T>> ExecSPAsync<T>(string query) { return await Context.Database.SqlQuery<T>(query).ToListAsync(); } Use of SQLCommand/SQLDatareader seems to be much efficient compared with SP call using EF. What would be the efficient way of calling SP using EF?
Ajeet MishraPosted May 5, 2016, 6:41 AM
Nice
Upendra Pratap ShahiPosted Apr 1, 2016, 10:02 AM
nice
Vignesh ManiPosted Mar 31, 2016, 8:45 AM
Good one
george gennerPosted Feb 2, 2016, 12:53 AM
IEnumerable<Configuration> empDetails = context.Database.SqlQuery<Configuration>("exec sampleproc").ToList(); Remove null in the above line when procedure does not accept Parameters Otherwise we will be getting an error like parameters can not be null
Rupali ShindePosted Dec 28, 2015, 3:01 AM
useful article on mvc with stored procedure ..
Gaurav GuptaPosted Apr 7, 2015, 3:19 AM
But if we have so many stored procedures in my database, then for each SP Entity framework creates a custom entity in my application model.???
rajaedpPosted Jul 12, 2014, 2:06 PM
I have tried using this example, but am getting compile error saying that " Translate method doesn't exist". I am using EF5.0. Any reason for this? Pls help.
Mukesh Kumar TiwariPosted Apr 29, 2014, 7:47 AM
Good one bro......