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));
 }
Exemple #3
0
 public OrderRepository(MegoDbContext _context)
 {
     this._context = _context;
 }
Exemple #4
0
 public ImageRepo(MegoDbContext _context)
 {
     this._context = _context;
 }
Exemple #5
0
 public MakesController(MegoDbContext _context, IMapper _mapper)
 {
     this._context = _context;
     this._mapper  = _mapper;
 }
 public FeaturesController(MegoDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Exemple #7
0
 public UnitOfWork(MegoDbContext context)
 {
     _context = context;
 }