开发者

How can i use Castle.ActiveRecord in WCF service?

开发者 https://www.devze.com 2022-12-20 02:38 出处:网络
I have a Silverlight application, a WCF service with a class library with ActiveRecord entities I need to load a list of entities from the class library in the WCF service and send it to the Silverli

I have a Silverlight application, a WCF service with a class library with ActiveRecord entities

I need to load a list of entities from the class library in the WCF service and send it to the Silverlight application

  1. How do I initialise ActiveRecordStarter in service and establish connection to DB?
  2. How do I provide ar:sessionScope?
  3. How do I do lazy loads?

Thank开发者_高级运维s for any help and any code


You should not try to send your entities through WCF service.

Create dedicated data contract and map your entities to that contract. Then you can use AR like in any other kind of application. You could use custom IParameterInspector to open and close session scope if you're not using Windsor.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号