コード例 #1
0
 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));
     }
 }
コード例 #2
0
 public IEnumerable <Town> GetById(int id, String server, int world)
 {
     return(_context.GetById(id, server, world));
 }
コード例 #3
0
 public Town GetById(int id)
 {
     return(_townRepository.GetById(id));
 }