Esempio n. 1
0
 public static DepositEntities GetInstance()
 {
     var instance = (DepositEntities) HttpContext.Current.Items[typeof (DepositEntities)];
     if (instance == null)
     {
         instance = new DepositEntities();
         HttpContext.Current.Items[typeof (DepositEntities)] = instance;
         HttpContext.Current.AddOnRequestCompleted(OnRequestCompleted);
     }
     return instance;
 }
Esempio n. 2
0
 // Required for InterestPaymentService
 public static DepositStates GetStateByName(string name, DepositEntities dbContext)
 {
     return dbContext.DepositStates.First(ds => ds.Name.Equals(name));
 }
Esempio n. 3
0
 public InterestPaymentHandler()
 {
     dbContext = new DepositEntities();
 }
Esempio n. 4
0
 // Required for InterestPaymentService
 public static Cards GetCardById(string id, DepositEntities dbContext)
 {
     return dbContext.Cards.First(c => c.Id.Equals(id));
 }
Esempio n. 5
0
 // Required for InterestPaymentService
 public static Deposits GetDepositById(int id, DepositEntities dbContext)
 {
     return dbContext.Deposits.First(d => d.Id == id);
 }