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);
        }
 public ReportService(MegoDbContext context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }
Esempio n. 3
0
 public OrderRepository(MegoDbContext _context)
 {
     this._context = _context;
 }
Esempio n. 4
0
 public ImageRepo(MegoDbContext _context)
 {
     this._context = _context;
 }
Esempio n. 5
0
 public MakesController(MegoDbContext _context, IMapper _mapper)
 {
     this._context = _context;
     this._mapper  = _mapper;
 }
Esempio n. 6
0
 public FeaturesController(MegoDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Esempio n. 7
0
 public UnitOfWork(MegoDbContext context)
 {
     _context = context;
 }