Re: Singletons in Session...?
- From: Michael Nemtsev [MVP] <nemtsev@xxxxxxx>
- Date: Mon, 28 Jan 2008 09:54:17 +0000 (UTC)
Hello laziers@xxxxxxxxx,
Could you explain what are u going to reach?
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo
l> Hi,
l> It is a good practice to insert singletons in Session?
l> I have more than 5 singletons and Im not sure that inserting all in
l> session state is a good idee :|
l> singleton looks like this:
l> l> public class DAO
l> {
l> public static DAO Instance
l> {
l> get
l> {
l> if (System.Web.HttpContext.Current.Session["DAO"] ==
l> null)
l> {
l> System.Web.HttpContext.Current.Session["DAO"] =
l> new DAO();
l> }
l> return System.Web.HttpContext.Current.Session["DAO"]
l> as DAO;
l> }
l> }
l> private DAO() { }
l> }
l> bye.
l>
.
- Follow-Ups:
- Re: Singletons in Session...?
- From: laziers@xxxxxxxxx
- Re: Singletons in Session...?
- References:
- Singletons in Session...?
- From: laziers@xxxxxxxxx
- Singletons in Session...?
- Prev by Date: Re: Windows Workflow Foundation on .NET 2.0?
- Next by Date: Re: Singletons in Session...?
- Previous by thread: Singletons in Session...?
- Next by thread: Re: Singletons in Session...?
- Index(es):
Relevant Pages
|