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 4619156
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:23:09+00:00 2026-05-22T02:23:09+00:00

I have a two tier architecture based website-data layer and UI layer. I have

  • 0

I have a two tier architecture based website-data layer and UI layer. I have a web page, I get the id of a customer from the querystring and I build the customer object from that id. I have several tabs in my webpage, so, unless I need the data, I dont have to load the data for the grids which are in the tabs that are not clicked. That’s why I use Lazy initialization for the properties of the customer which are not required on page load.

My question is, in page load when I create the customer object, if I add the customer object to session as Session[id]=customerObj, I understand that customerObj gets serialized, but does it mean that all the properties which are lazy initialized get loaded? If so, that will defeat the purpose of using lazy initialization.

I tried to look on MSDN, but could not find good explanation of how this thing is supposed to work. Any inputs is greatly appreciated.
Thanks!

  • 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-22T02:23:10+00:00Added an answer on May 22, 2026 at 2:23 am

    You can store an object in te session in several ways:

    http://msdn.microsoft.com/en-us/library/h6bb9cz9%28VS.71%29.aspx

    If you store the object InProc, it stays in the RAM of the webserver and it is not serialized and deserialized, so the properties aren’t touched.

    That way there is no lazy loading triggered. Your object will stay the same as you left it when you get it back the next postback.

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

Sidebar

Related Questions

We have to implement a two tier architecture to distribute a cache from a
I have inherited a middle tier system with some multi-Threading issues. Two different threads,
I have two arrays of System.Data.DataRow objects which I want to compare. The rows
I have two identical tables and need to copy rows from table to another.
we are working on a website with three tier architecture. And the content store
We have two pieces of architecture. In essence they form a producer and a
In an N-Tier app you're supposed to have a business logic layer and a
I have two nested repeaters in my *.aspx page. <asp:Repeater runat=server id=rptMain> <ItemTemplate> <h1><%#DataBinder.Eval(Container.DataItem,
We're developing a middle-tier to replace an existing business logic/data access layer. One of
I am writing a comparitive essay on two-tier and three architecture in terms of

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.