This question is locked. New answers and comments are not allowed.
Hi there,
we have created a WCF webservice using OpenAccess from Telerik and it works all fine with entities and views.
We are now trying to use some stored procedures but we are not able to access them like we do with the tables and views.
What we've done sofar was creating a partial class to extend the EntitiesModelService with a method to call the stored procedure.
We've already created a Domain Method for the stored procedure in the model.
and added this line in the EntitiesModelService
we have followed the indications on this post: http://www.telerik.com/community/forums/orm/getting-started/using-stored-procedures-in-entity-model-with-a-service.aspx
Thanks in advance for your help!!!
Antonio.
we have created a WCF webservice using OpenAccess from Telerik and it works all fine with entities and views.
We are now trying to use some stored procedures but we are not able to access them like we do with the tables and views.
What we've done sofar was creating a partial class to extend the EntitiesModelService with a method to call the stored procedure.
We've already created a Domain Method for the stored procedure in the model.
public
partial
class
EntitiesModelService
{
[WebGet]
public
IEnumerable<Store> FncGetNearbyPlaces(
float
? lat,
float
? lng,
float
? distance)
{
return
(
new
EntitiesModel()).FncGetNearbyPlaces(lat, lng, distance);
}
}
and added this line in the EntitiesModelService
public
static
void
InitializeService(DataServiceConfiguration config)
{
...
config.SetServiceOperationAccessRule(
"FncGetNearbyPlaces"
, ServiceOperationRights.All);
}
we have followed the indications on this post: http://www.telerik.com/community/forums/orm/getting-started/using-stored-procedures-in-entity-model-with-a-service.aspx
Thanks in advance for your help!!!
Antonio.