public void deleteNgo(string NgoId) { NgoList n = _context.NgoList.Find(NgoId); _context.Remove(n); _context.SaveChanges(); }
public void TestUpdateNgo() { NgoList ngolist = _repo.GetNgoId("4"); ngolist.NgoMobile = "9876567890"; _repo.updateNgo(ngolist); NgoList ngolist1 = _repo.GetNgoId("4"); Assert.AreSame(ngolist, ngolist1); }
public IActionResult addNgolist(NgoList obj) { try { _repo.ngoRegistration(obj); return(Ok()); } catch (Exception e) { return(NotFound(e.Message)); } }
public IActionResult updateNgo(NgoList ngolist) { try { _repo.updateNgo(ngolist); return(Ok()); } catch (Exception e) { return(NotFound(e.InnerException.Message)); } }
public void updateNgo(NgoList ngolist) { _context.NgoList.Update(ngolist); _context.SaveChanges(); }
public void ngoRegistration(NgoList ngolist) { _context.Add(ngolist); _context.SaveChanges(); }