What's this in RaccoonBlog?

51 views
Skip to first unread message

Wayne Douglas

unread,
May 21, 2012, 3:01:17 PM5/21/12
to rav...@googlegroups.com
In the base controller ( https://github.com/ayende/RaccoonBlog/blob/master/HibernatingRhinos.Loci.Common/Controllers/RavenController.cs ) we're pulling the  IDocumentSession from HttpContext

in MvcApplication ( https://github.com/ayende/RaccoonBlog/blob/master/RaccoonBlog.Web/Global.asax.cs ) you insert that IDocumentSession by calling RavenController.DocumentStore.OpenSession

This seems a bit long winded and around the houses to me - am I missing something?

w://

Oren Eini (Ayende Rahien)

unread,
May 21, 2012, 3:02:46 PM5/21/12
to rav...@googlegroups.com
It is.
We can access this from the local prop as well.
Initially the scope of the request was the action, but because we make heavy use of child actions, we moved the scope to the request, and I guess that stuck

Chris Marisic

unread,
May 21, 2012, 3:11:34 PM5/21/12
to rav...@googlegroups.com
I'm more interested in knowing what's going on here??

// Work around nasty .NET framework bug
try
{
}
catch (Exception)
{
}

Oren Eini (Ayende Rahien)

unread,
May 21, 2012, 3:20:31 PM5/21/12
to rav...@googlegroups.com

Wayne Douglas

unread,
May 21, 2012, 4:12:50 PM5/21/12
to rav...@googlegroups.com

Tell me what you want this to look like and i'll get you a pull request :)

Oren Eini (Ayende Rahien)

unread,
May 21, 2012, 4:14:12 PM5/21/12
to rav...@googlegroups.com
Just refactor to make this pretty ?

Wayne Douglas

unread,
May 21, 2012, 4:16:23 PM5/21/12
to rav...@googlegroups.com

public void WTF()

Hahahaa

Wayne Douglas

unread,
May 21, 2012, 4:16:52 PM5/21/12
to rav...@googlegroups.com

Ok :)

Reply all
Reply to author
Forward
0 new messages