protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting( filterContext); _database = new DatabaseWithMVCMiniProfilerAndGlimpse( "PetaPocoWebTest"); _database.EnsureDatabase(); _tags = new TagRepository( _database); _articles = new ArticleRepository( _tags, _database); _authors = new AuthorRepository( _database); HttpContext.Items[DatabaseWithGlimpseProfiling.PetaKey] = TempData[DatabaseWithGlimpseProfiling.PetaKey]; }
public ArticleRepository(TagRepository tagRepository, PetaPoco.Database database) : base(database) { _tagRepository = tagRepository; }