public ActionResult <ItemLitigio> Post(ItemLitigio item)
 {
     try
     {
         item = _service.Add(item);
         return(item);
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <ItemLitigio> Put(int id, ItemLitigio item)
 {
     try
     {
         return(Ok(_service.Update(item, id)));
     }
     catch (NotFoundException)
     {
         return(NotFound("Item não encontrado!"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <ItemLitigio> Get(int id)
 {
     try
     {
         ItemLitigio item = _service.Find(id);
         if (item == null)
         {
             return(NotFound("Item não encontrado!"));
         }
         return(item);
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }