Andrew Nurse: Inside "Razor"

1.03GB WMV Download - Wow, 'I may be gone sometime...'
That's for the high res WMV... This is a 72 minute interview. High res = 848x480 with 3mbs+ bit rate.... Download the lesser quality WMV version or the mp4.
C
No worries, wasn't really a criticism - just the largest video that I recall seeing.
Noticed the Connect option for Channel 9 feedback - is this preffered over feedback via the forum?
Yep. For Rev9 bugs and feedback, please use Connect!!
C
I am looking @ the video, and am very interested in the way you are doing this .... are you going to release the source at any time ?
Bug tracking system for ... you know ... bugs
Are you going to share the QueryFactory design or code here ? Would appreciate if you can post some code on that subject ?
@Sampy: Is your QueryFactory design only intended to work with NHibernate ?
QueryFactory is actually very simple
namespace Channel9Controller.Infrastructure { public class QueryFactory : IQueryFactory { private readonly IUnityContainer container; public QueryFactory(IUnityContainer container) { this.container = container; } public TQueryType Create<TQueryType>() where TQueryType : IQuery { TQueryType query = container.Resolve<TQueryType>(); query.EnableCaching(); return query; } } }
The trick is that every query takes an NHibernate ISession that it uses to do its work. I have that session delivered up by the Unity container so all the Query has to do is specify that it needs ISession by taking one it its constructor and it gets the session for this request. Queries can also take addition parameters if they need. Most don't need any but some need to do operations based on when Now is so they take an IClock which is a simple interface that has a single property Now. I use this instead of DateTime.Now to make things easier to test and to ensure that time is tightly controlled in the application. I even have a specialty clock that returns Now as the most recently passed 5 minute mark (10:00, 10:05, etc). I use this for checking things like Published on an Entry or Banned on a user so that the query will cache better.
Would this be possible :
https://channel9.msdn.com/forums/Coffeehouse/565569-Videos-Forum-please/ ?
Very cool...
awesome work you have done here.
have you blogged anything you have learned since this... also does any other projects in your office use a simlar approach/architecture?