This is a migrated thread and some comments may be shown as answers.

[Solved] Calling a stored proc from EF Crud event handler?

2 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Julian
Top achievements
Rank 1
Julian asked on 17 May 2013, 06:10 PM
I have data that requires views to properly pull the correct updated columns from various tables. So a user can update on one webpage a Column for "EstimatedCompletionDate" of a task. Another page has this same date but it applies to a different task. So the easiest way to get the right data into the right grid is to utilize views. I'd like to use the Entity Framework DataSource but I'm not sure how to execute the stored procedure call?

Is there an example of how to do this?

I'm using Rad Controls for ASP.NET AJAX version 2013.1.220.

Thanks

2 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 22 May 2013, 08:27 AM
Hello,

 The stored procedure should be mapped to the Entity Data Model first. Then you can try calling it by using the CommandText property or the QueryCreated event to specify more complex LINQ queries executed by the control. Or if you prefer you can directly query an entity created from the custom view in the database.
More information can also be found in the following links:
http://stackoverflow.com/questions/717740/can-i-call-a-stored-procedure-from-an-entitydatasource
http://msdn.microsoft.com/en-us/library/cc488556(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/ee404748(v=vs.100).aspx

I hope this helps.

Regards,
Marin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Julian
Top achievements
Rank 1
answered on 22 May 2013, 12:46 PM
Thanks I'll review the links! :)
Tags
Grid
Asked by
Julian
Top achievements
Rank 1
Answers by
Marin
Telerik team
Julian
Top achievements
Rank 1
Share this question
or