public VehicleRepository(FmDbContext dbContext, IUnitOfWork unitOfWork, IUserSession userSession, IMapper mapper)
 {
     _dbContext   = dbContext;
     _unitOfWork  = unitOfWork;
     _userSession = userSession;
     _mapper      = mapper;
 }
Example #2
0
        public DriverTest()
        {
            var dbOptions = new DbContextOptionsBuilder <FmDbContext>()
                            .UseInMemoryDatabase(databaseName: "FleetMgmt")
                            .Options;
            var context = new FmDbContext(dbOptions);

            _driverRepository = new DriverRepository(context);
        }
 public TripRepository(FmDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public DriverRepository(FmDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public AccidentRepository(FmDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Example #6
0
 // readonly IDbContextTransaction _transaction;
 public UnitOfWork(FmDbContext dbContext)
 {
     _dbContext   = dbContext;
     IsActive     = true;
     _transaction = dbContext.Database.BeginTransaction();
 }