public LoanOfficer bringLOfficer(string id) { LORepository repo = new LORepository(); LoanOfficer data = repo.Get(Convert.ToInt32(id)); return(data); }
public int Delete(int id) { LoanOfficer loanofficerToDelete = context.LoanOfficers.SingleOrDefault(d => d.LOfficer_Id == id); context.LoanOfficers.Remove(loanofficerToDelete); return(context.SaveChanges()); }
public int Update(LoanOfficer LoanOfficer) { LoanOfficer loanofficerToUpdate = context.LoanOfficers.SingleOrDefault(d => d.LOfficer_Id == LoanOfficer.LOfficer_Id); loanofficerToUpdate.LOfficer_name = LoanOfficer.LOfficer_name; return(context.SaveChanges()); }
public int Insert(LoanOfficer LoanOfficer) { Logininfo li = new Logininfo(); li.Login_acc_no = context.LoanOfficers.Count() + 1; li.Login_Name = LoanOfficer.LOfficer_name; li.Login_Password = LoanOfficer.LOfficer_Password; li.Login_type = "LOfficer"; context.Logininfos.Add(li); context.LoanOfficers.Add(LoanOfficer); return(context.SaveChanges()); }