The first approach doesn't work since it's a mix of POCO and EF. Because the entities were defined in the EDM DevForce is treating them as EF entities and not taking the POCO processing path which would call your FetchLocations query method. You can work around this by creating a custom EntityServerQueryInterceptor, but it may not be a very robust solution. The interceptor would need to override the standard ExecuteQuery logic to explicitly call your fetch method, and then force the result. Something like this:
public class QueryInterceptor : EntityServerQueryInterceptor {
protected override bool ExecuteQuery() {
PocoServiceProvider provider = new PocoServiceProvider();
var list = provider.FetchLocations();
ForceResult(list);
return true;
}
}
If you support create/update/delete then you'd also need a custom EntityServerSaveInterceptor to override default save logic.
Your second approach, using the RPC method, should work as long as the entities are also defined on the Silverlight client, which they will be if the *Ib.Designer.cs file is added as a link.