Search code examples
c#.netsilverlightnhibernatewcf-ria-services

How to generate Domain Service Class for Nhibernate?


I have a Silverlight application that is making calls via WCF RIA Services. I have service proof of concept examples that reference both the Entity Framework and Linq to SQL, but am now on a project that requires NHibernate instead of EF or L2S.

How would I add a Domain Service Class that uses already generated NHibernate classes instead of one of the other frameworks?


Solution

  • Found a working example of a Domain Service using NHibernate and a quick walk-through for creating a basic empty domain service from scratch.

    Also, any objects in your service you are returning must have a Key attribute on a property or else the Web.g.cs (generated code) file on the Silverlight side won't get generated and you won't be able to call, won't see in Data Source window etc.