public IHttpActionResult Putmortgage(Mortgage mortgage) { bool result = this.mortgagesService.EditMortgage(mortgage); return Ok(result); }
public bool EditMortgage(Mortgage mortgage) { this.mortgageRepository.Update(mortgage); this.mortgageRepository.SaveChanges(); return true; }
public IHttpActionResult Postmortgage(Mortgage mortgage) { string result = this.mortgagesService.CreateMortgage(mortgage); return Ok(result); }
public string CreateMortgage(Mortgage mortgage) { this.mortgageRepository.Add(mortgage); this.mortgageRepository.SaveChanges(); return mortgage.UPI; }