Ejemplo n.º 1
0
 public void CreateLoan(Loan model)
 {
     using (var ctx = new MicrozayimContext())
     {
         ctx.Loans.Add(model);
         ctx.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void UpdateLoan(Loan model)
 {
     using (var ctx = new MicrozayimContext())
     {
         var upAmount = ctx.Loans.FirstOrDefault(x => x.Id == model.Id);
         upAmount.Amount = model.Amount;
         upAmount.Status = model.Status;
         ctx.SaveChanges();
     }
 }