RIA DomainService not showing up in SilverLight v4 client RRS feed

  • Question

  • Hi!

    I have a VS2010 solution based on the SilverLight Business Application. Giving the SL client access to a Entity Framework repository was a no brainer BUT trying to accomplish the same based on POCOs has been a totally different matter. I have a class, SearchResult, which carries a payload based on a search result from a search engine. For each search request there will only be one result with the actual search hits residing in a IList<IDocument>. The domain service class looks something like this:


        public class SearchService : DomainService
            public ISearchResult Search(string text, int offset, int count)
                return SolrServer.Search("*:*", 0, 10);


    The SolrServer.Search static method returns an implementation of the ISearchResult interface such as (some code removed for brevity):

        public class SearchResult : ISearchResult
            public SearchResult(ISolrQueryResults<Dictionary<string, object>> results)
            public Guid RequestID { get { return _requestid; } }
            public IList<IDocument> Documents
            public IDictionary<string, IFacet> Facets

    Now when I build the RIA-service and try to access the SearchServiceContext class in my SL client it doesn't exist. As I mentioned earlier publishing an EF-based repository is a no-brainer and works out of the box. I also created a dummy method, something like the below, but it doesn't show up either.

            public IEnumerable<int> foo()
                IList<int> lst = new List<int>();
                return lst.AsEnumerable<int>();

    What am I doing wrong here?


    Many thanks in advance!

    Friday, December 2, 2011 2:29 PM