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

            _driverRepository = new DriverRepository(context);
        }
コード例 #3
0
 public TripRepository(FmDbContext dbContext)
 {
     _dbContext = dbContext;
 }
コード例 #4
0
 public DriverRepository(FmDbContext dbContext)
 {
     _dbContext = dbContext;
 }
コード例 #5
0
 public AccidentRepository(FmDbContext dbContext)
 {
     _dbContext = dbContext;
 }
コード例 #6
0
 // readonly IDbContextTransaction _transaction;
 public UnitOfWork(FmDbContext dbContext)
 {
     _dbContext   = dbContext;
     IsActive     = true;
     _transaction = dbContext.Database.BeginTransaction();
 }