public IEnumerable <User> GetAllUsers()
 {
     using (var context = new WalletDBContext())
     {
         return(context.Users.Include(u => u.Dogs).ToList());
     }
 }
 public void AddUser(User user)
 {
     using (var context = new WalletDBContext())
     {
         context.Users.Add(user);
         context.SaveChanges();
     }
 }
Example #3
0
 public BasicAuthenticationHandler(
     IOptionsMonitor <AuthenticationSchemeOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     WalletDBContext context)
     : base(options, logger, encoder, clock)
 {
     _context = context;
 }
 public RoleController(WalletDBContext context /*, IOptions<JWTSettings> jwtsettings*/)
 {
     _context = context;
     // _jwtsettings = jwtsettings.Value;
 }
 public LoginController(WalletDBContext context, IOptions <JWTSettings> jwtsettings)
 {
     _context     = context;
     _jwtsettings = jwtsettings.Value;
 }
 public TransactionController(WalletDBContext context)
 {
     _context = context;
 }
 public WalletController(WalletDBContext context)
 {
     _context = context;
 }
Example #8
0
 public BalanceRepository(WalletDBContext ctx)
 {
     _ctx = ctx;
 }