public ActionResult Delete(TownDTO entity) { try { Town t = townRepository.GetById(entity.TownID); townRepository.Delete(t); townRepository.Save(); return(Json(entity, JsonRequestBehavior.DenyGet)); } catch (Exception e) { return(Json(false, JsonRequestBehavior.DenyGet)); } }
public IEnumerable <Town> GetById(int id, String server, int world) { return(_context.GetById(id, server, world)); }
public Town GetById(int id) { return(_townRepository.GetById(id)); }