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