Tuesday, December 13, 2016

The function import 'DBEntities' cannot be executed because it is not mapped to a store function.


1. Open EDMX in to Design Mode
2. Click Model Browser then type the Store procedure name on search and press Enter.
   It will highlight the store procedure.






3. If you already try to add this store procedure, then in some case it create Function when you have a return value on your SP.  other wise it will not create the function. remove all from function.


3. If your SP has no return type then you may can use a simple return type value like :  
SELECT 1 as DefaultValue  if you already have return type then you don't need that.


4. Select the Store procedure from model browser-> right click -> Add function Import.
 


5. Check Complex and Click Get column Information


6. Click on Create New Complex type.







7. It will create Function and complex type for that Store Procedure.


Click OK and Build your application.

Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file

In my Xamarin form application their was dependency Restclient on Microsoft.Bcl.Build Microsoft.Bcl. i just remove all using nuget and ...