.NET RIA Services and Custom Data Model - CRUD Capabilities
I would like to ".NET RIA Service" - use my custom data model (BLL / DAL). Are there interfaces I have to implement to enable this functionality, or all I have to do is create a domain service? If so, how do I tell my domain services about my BLL? Astoria needs to implement IQueryable and IUpdatable interfaces for CRUD capabilities. Is this the same for RIA services?
source to share
All you have to do is create a DomainService. The DomainService will have methods like GetMyObjects () and InsertObject (MyObject object) that return or accept objects for your BLL - how you tell the DomainService about your classes. The Get *** () methods in DomainService should return a generic IQueryable, but you don't need to implement it yourself. There's an extension method AsQueryable () that I believe can be used on a generic list, IEnumerable or Array, which converts any list of objects to IQueryable. It should be easy enough to create a DomainService to migrate an existing BLL. Brad Abrams has a great post describing this scenario:http://blogs.msdn.com/brada/archive/2009/07/22/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-6- poco-and-authentication-provider.aspx
source to share