Just learning Silverlight 4/RIA and i 'm stuck in a weird problem: setup an ASP.NET MVC project as the project hosting the Domain service. In this i tried to get data from the Domain Service which worked fine (i'm using a repository which gets resolved using Windsor Castle).
Now i tried to setup a SL4 project. I though i do it the MVVM-way, so i decided to setup a ViewModel Class with the following code:
public class ViewModel
{
O开发者_JS百科rganizationDomainContext dsCtxt = new OrganizationDomainContext();
public ViewModel()
{
EntityQuery<Culture> query = from cu in dsCtxt.GetAllCulturesQuery()
select cu;
LoadOperation<Culture> lo = dsCtxt.Load(query);
}
}
The crazy thing about this is .. it doesn't return anything!!! What am i missing here?
EDIT: I was not very clear about this issue: i 'm using Windsor Castle to do IoC stuff. Using Fiddler i see that the application tries to resolve something that looks like the name of the Silverlight application.
Thanks in advance
It turns out that the aforementioned Silverlight application is actually the service i'm using to get data. I solved this ignoring routing issues to this service (in RegisterRoutes() ) like this:
routes.IgnoreRoute("{*allsvc}", new { allsvc = @".*\.svc(/.*)?" });
精彩评论