EF4 POCO WCF Serialization problems (no lazy loading, proxy/no proxy, circular references, etc)

后端 未结 5 1477
慢半拍i
慢半拍i 2021-02-15 12:23

OK, I want to make sure I cover my situation and everything I\'ve tried thoroughly. I\'m pretty sure what I need/want can be done, but I haven\'t quite found the perfect combin

5条回答
  •  广开言路
    2021-02-15 12:55

    Faced the same issue today and used Value Injecter to solve it. It's as simple as:

    var dynamicProxyMember = _repository.FindOne(m=>m.Id = 1);
    var member = new Member().InjectFrom(dynamicProxyMember) as Member;
    

    We couldnt afford disabling ProxyCreation

提交回复
热议问题