Entity Framework, Import Function Stored Procs & Data Services
-
Hi I'm hoping someone can point me in the right direction. I'm trying to use EF within a Data Service, returning data from a SQL stored procedure. I've successfully followed the quickstart here http://msdn.microsoft.com/en-us/library/dd728275.aspx[^] to get a basic service up & running against my own DB, rather than Northwind. I've found this article telling me how to expose stored procedures http://msdn.microsoft.com/en-us/data/gg699321.aspx[^], which creates the expected public ObjectResult entry in the model, but when my service tries to do the
Quote:
config.SetServiceOperationAccessRule("GetContact", ServiceOperationRights.AllRead);
I get the error 'The given name 'GetContact' was not found in the service operations', even though I can see it as a public method in the object browser. I have also found this article http://msdn.microsoft.com/en-us/library/cc668788.aspx[^] saying that to be exposed as a service operation for the service, it must return viod, IQueryable, IEnumerable, priomitive type or an entity type in the model. How do I reconcile the latter requirement with the former ObjectResult way of doing things. My Google skills have failed me, so pointers to documentation will be welcome. Regards, Stewart