示例#1
0
        public AtmManagmentContext GetContext()
        {
            var    optionsBuilder = new DbContextOptionsBuilder <AtmManagmentContext>();
            string connStr        = "User ID = postgres;Password=1;Server=localhost;Port=5432;Database=atm;Integrated Security=true; Pooling=true;";
            var    dbOpt          = optionsBuilder.UseNpgsql(connStr);
            var    _context       = new AtmManagmentContext(optionsBuilder.Options);

            return(_context);
        }
 public Repository(AtmManagmentContext Context)
 {
     _context = Context;
 }
 public TerminalRepository(AtmManagmentContext Context) : base(Context)
 {
 }
示例#4
0
 public AccountRepository(AtmManagmentContext Context) : base(Context)
 {
 }
示例#5
0
 public AtmService(IHsmService hsmService, AtmManagmentContext dbcontext, IAccountRepository accountRepository)
 {
     _hsmService = hsmService;
     _dbcontext  = dbcontext;
     _accRepo    = accountRepository;
 }