How To Call Stored Procedure Using Entity Framework
> First of all add Entity Framework to your solution as shown in the link.
>
How To Add Entity Framework In Visual Studio
> For Calling Stored Procedure using Entity Framework follow the below code.
> Here
TechnomarkEntities is the instance of Entity Model.
>
Using enclosure do the
automatic Connection Open and Close.
> Its always better to accept the result of an Stored Procedure in
var result
> Now
Entity Instance.Name of SP will give the result as shown below
>
var result = obj.GetdatFromSp();
> If the SP have parameters, then specify them after the opening bracket.
>
var result = obj.GetdatFromSp("Name");
> By this way we can call Stored Procedure using Entity Framework.
Watch Video of this Content on Video Streaming