Пример #1
0
    public DbSetSoftwareTests()
    {

      var optionsBuilder = new DbContextOptionsBuilder<EfAsLicenceContext>();
      optionsBuilder.UseSqlServer("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AS_LICENCE;Data Source=.");

      EfAsLicenceContext context = new EfAsLicenceContext(optionsBuilder.Options);

      _unitOfWork = new EfUnitOfWork(context);
    }
Пример #2
0
        public CustomerManagerTests(ITestOutputHelper outputHelper)
        {
            this._outputHelper = outputHelper;
            var optionsBuilder = new DbContextOptionsBuilder <EfAsLicenceContext>();

            optionsBuilder.UseSqlServer("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AS_LICENCE;Data Source=.");

            EfAsLicenceContext context = new EfAsLicenceContext(optionsBuilder.Options);

            _unitOfWork = new EfUnitOfWork(context);

            _customerManager = new CustomerService(_unitOfWork);
        }
Пример #3
0
 public EfUnitOfWork(EfAsLicenceContext context)
 {
     this._context = context;
 }
Пример #4
0
 public EfEntityRepositoryBase(EfAsLicenceContext context)
 {
     _context = context;
     _dbSet   = _context.Set <TEntity>();
 }