Last post Oct 16, 2014 07:23 AM by Ananth.G
Oct 15, 2014 08:40 AM|Ananth.G|LINK
in my project i was using asp.net mvc 4 entity framework 6.0.
i was create a stored procedure with schema name.
i was create edmx file for that.
that procedure was display in edmx file
when i call the stored procedure in server side code it does not show,but tables are displayed perfectly.
some please help.
Oct 15, 2014 11:01 PM|Kevin Shen - MSFT|LINK
About how to use store procedure in entity framework, please follow the steps below:
And in your dbcontext , you will find procedure code snippet in your dbcontext like below:
public virtual ObjectResult<Procedure1_Result> Procedure1(Nullable<int> param1)
var param1Parameter = param1.HasValue ?
new ObjectParameter("param1", param1) :
new ObjectParameter("param1", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Procedure1_Result>("Procedure1", param1Parameter);
Here is a tutorial which you can refer to:
Oct 16, 2014 07:23 AM|Ananth.G|LINK
thanks for your reply...
now its working..