Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 410789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:55:22+00:00 2026-05-12T17:55:22+00:00

I have a POCO classes that I am using with NHibernate in a WCF

  • 0

I have a POCO classes that I am using with NHibernate in a WCF service layer. And I am thinking about trying to send the NHibernate proxy classes down to a client. This is a client that I control. We handle record updates with a system wide reservation so there can only be one writable copy of this entity sent to a client at any given time. My basic goal is to take advantage of NHibernates change tracking so I don’t need to fetch a copy from the database and replay the changes the client made to update the db.

Assuming I could get this to work what are the cons of this approch?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:55:23+00:00Added an answer on May 12, 2026 at 5:55 pm

    Lazy-loading will give you the biggest headache.

    Some of the properties on your objects will contain NHibernate proxies, which are attached to the ISession. All of this will travel back to the client. When the client attempts to deserialise your objects, the proxies get invoked and attempt to retrieve more data. BOOM!

    There are several workarounds people have posted (Google “nhibernate wcf” or “nhibernate wcf lazy loading“):

    http://lunaverse.wordpress.com/2007/05/09/remoting-using-wcf-and-nhibernate/

    http://timvasil.com/blog14/post/2008/02/WCF-serialization-with-NHibernate.aspx

    http://whiletrue.nl/blog/?p=37

    http://trentacular.com/2009/08/how-to-use-nhibernate-lazy-initializing-proxies-with-web-services-or-wcf/

    I’m currently working on swapping out the proxies with custom ones, so they make a WCF call instead of triggering the Nhibernate lazy-load.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service with an Entity Framework 4 model, using POCO classes
Well, I am creating a WCF service, that have a large number of classes
I have a simple prototype WCF service based on Entity framework POCO classes. When
I have a simple Poco-Model using abstract classes, and it seems not to work
I am using the UnitOfWork/Service Layer/Repository/EF4 w/POCO design in my MVC app. So far
EF and ORM. I recently realized that is possible using POCO to have clean
I have an ntier solution which has a Domain project for my POCO classes.
I have seen many articles about POCO. What is this?
I have a dictionary of objects; they are all POCO objects that should be
My application I have an application design that looks like this: web application layer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.