Exemplo n.º 1
0
        public void Init()
        {
            var options = EfInMemory.CreateOptions <MWDBContext>();

            _context = new MWDBContext(options);
            DbInitializer.Initialize(_context);
            _boardRepository = new BoardRepository(_context);

            _boardController = new BoardController(_boardRepository);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 建構子
 /// </summary>
 /// <param name="context">Database context</param>
 public UserController(MWDBContext context)
 {
     _context = context;
     _userBl  = new UserBl(_context);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 建構子
 /// </summary>
 /// <param name="context">Database context</param>
 public BoardController(MWDBContext context)
 {
     _context     = context;
     _boardBl     = new BoardBl(_context);
     _boardHelper = new BILib.BoardHelper(_context);
 }
Exemplo n.º 4
0
 public CommentRepository(MWDBContext context) : base(context)
 {
 }
Exemplo n.º 5
0
 public ArticleRepository(MWDBContext context) : base(context)
 {
 }
 public EFRepository(MWDBContext context)
 {
     _context = context;
     _dbSet   = context.Set <TEntity>();
 }
Exemplo n.º 7
0
 public BoardHelper(MWDBContext context)
 {
     webDB = context;
 }
 public BoardRepository(MWDBContext context) : base(context)
 {
 }
Exemplo n.º 9
0
 public ApiController(MWDBContext context)
 {
     _context     = context;
     _boardHelper = new BILib.BoardHelper(_context);
 }
 public UserRepository(MWDBContext context) : base(context)
 {
 }
Exemplo n.º 11
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="context"></param>
        public BoardBl(MWDBContext context)
        {
            _dbContext = context;

            SetFakeData();
        }
Exemplo n.º 12
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="context"></param>
        public UserBl(MWDBContext context)
        {
            _dbContext = context;

            SetFakeData();
        }