Inheritance: BaseRepository
        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];
        }
示例#2
0
 public ArticleRepository(TagRepository tagRepository, PetaPoco.Database database) : base(database)
 {
     _tagRepository = tagRepository;
 }