Friday, February 7, 2020

Entity Framework: How to update stored procedure in EDMX

An .edmx file is an XML file that defines an Entity Data Model (EDM), describes the target database schema, and defines the mapping between the EDM and the database.

Update imported stored procedure /view in EDMX:

1.       Open the .edmx file and right click on EDMX and select Model Browser



2.       In Model Browser, the Functions Imports under OfficeModel tab and select stored procedure ‘GetOfficeHistoryByID’ and Click on Edit




3.       “Edit Function Import” window will be opened and Click on “Get Column Information” button to get stored procedure the output schema.




4.       Click on Update Button under “Returns a Collection of” Section to update complex type “GetOfficeHistoryByID_Result”, which will be used to map the stored procedure output data.


5.       Save .edmx file to reflect field changes related to stored procedure /view.


2 comments:

Anonymous said...

This article is very useful easily understandable. Thank you, bro

Anonymous said...

This article was Very useful to me as a fresher, thank you

SQL Server - Identify unused indexes

 In this blog, we learn about the index usage information (SYS.DM_DB_INDEX_USAGE_STATS) and analyze the index usage data (USER_SEEKS, USER_S...