Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys,

I have problem... I don't know how to call function(stored procedure) from Entity Data Model in SL application.

I create Silverlight Application in VS2010 (TestSPinSL).

I create ADO.NET Entity Data Model (Model1,edmx).
http://www.shrani.si/f/1R/AL/1KCxylTh/1.png
From database: Northwind.dbo I create NorthwindModel.
Connection settings has been saved in Web.Config file.
In object from database I select only Stored Procedure: Employee Sales by Country.
In Model Browser I choose Add Function Import...

Auto generated code is visible in Model1.Designer.cs
http://www.shrani.si/f/1D/WY/3nkhLcTf/2.png


I want to call function/stored procedure (parameters for example: @Beginning_Date = N'1997-08-30', @Ending_Date = N'1998-01-01') and display results from stored procedure in dataGrid1.
http://www.shrani.si/f/O/SU/3u4M74uf/3.png


Is there some code example for this type of problem?

Thanks!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900