I'm trying to do some refactoring on a project. I want to replace the code between the lines and with the two commented lines above it so I can use it on another page where I need the quote object

```
        //quote.LoadActive();
        //QuoteID = quote.Id;

        //--------------------------------------------------------
        List<Quote> DBquotes = session.Query<Quote>()
            .Customize(x => x.WaitForNonStaleResultsAsOfLastWrite())
            .ToList();

        foreach (Quote q in DBquotes)
        {
            if (q.IsActive)
            {
                QuoteID = q.Id;
                quote = session.Load<Quote>(q.Id);
            }
        }
        //--------------------------------------------------------

```

Here's the LoadActive() function inside the Quote class

```
    public Quote LoadActive()
    {
        List<Quote> DBquotes = session.Query<Quote>()
            .Customize(x => x.WaitForNonStaleResultsAsOfLastWrite())
            .ToList();

        foreach (Quote q in DBquotes)
            if (q.IsActive)
                return session.Load<Quote>(q.Id);

        return new Quote();
    }

```

But I don't know how to actually update the quote object. I can't update inside the function without doing it element by element and that's too tedious. If I try and do quote = quote.LoadActive() then it complains that quote hasn't been initialized. I'm sure there's a way to set up what I'm trying to do but I'm blanking and can't think of good keywords to google my question. I couldn't even come up with a good subject wording for this post!

EDIT: tl;dr I need to load the active quote into the 'quote' object to be used by the page. What's in between the lines works, I want to replace all with the commented lines above (or something similar).