after serialization event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • butch77@web.de

    after serialization event

    Hi!
    I have a webservice class that returns an object.
    This object loads dependent objects through parameters dynamically.
    A simplified version would look like this:

    private EntityAssociati on<Page_pages;
    [XmlIgnore, SoapIgnore]
    public EntityAssociati on<Pagepages
    {
    get
    {
    if (_pages == null)
    _pages = new EntityAssociati on<Page>(this, "pages");
    return _pages;
    }
    set { _pages = value; }
    }

    I'd really like to keep it like this.
    But, here is my problem. all these objects load data from the
    database, and there might be a few of those objects returned. Since
    I'd like to keep the connection to the database open until the last
    call is finished. I need some sort of event that's called after SOAP
    has finished the serialization. So I can call the connection.clos e().

    Any idea how that could work.
    I'm using a workaround at the moment to avoid problems, in just
    loading all dependent objects before serialization. But to increase my
    flexibility I'd really like to change it.

    Thanks!!
Working...