コード例 #1
0
        public ReportServiceTest()
        {
            // for test create db in memory
            _context = new MegoDbContext(new DbContextOptionsBuilder <MegoDbContext>()
                                         .UseSqlite("Filename=:memory:")
                                         .Options);
            _context.Database.OpenConnection();
            _context.Database.EnsureCreated();

            _reportService = new ReportService(_context);
        }
コード例 #2
0
 public ReportService(MegoDbContext context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }
コード例 #3
0
ファイル: OrderRepository.cs プロジェクト: denis-shu/Orders
 public OrderRepository(MegoDbContext _context)
 {
     this._context = _context;
 }
コード例 #4
0
 public ImageRepo(MegoDbContext _context)
 {
     this._context = _context;
 }
コード例 #5
0
 public MakesController(MegoDbContext _context, IMapper _mapper)
 {
     this._context = _context;
     this._mapper  = _mapper;
 }
コード例 #6
0
 public FeaturesController(MegoDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #7
0
ファイル: UnitOfWork.cs プロジェクト: denis-shu/Orders
 public UnitOfWork(MegoDbContext context)
 {
     _context = context;
 }