public virtual IHttpActionResult Post([FromBody] Request <DiseaseHistory> request)
 {
     try
     {
         if (string.IsNullOrEmpty(request.Data.DISEASEHISTORYID))
         {
             _repository.Add(request.Data);
         }
         else
         {
             _repository.Update(request.Data);
         }
     }
     catch (Exception ex)
     {
         //LogHelper.WriteError(ex.ToString());
         return(BadRequest(ex.Message));
     }
     return(Ok());
 }
Пример #2
0
 public DiseaseHistory AddDiseaseHistory(DiseaseHistory history)
 {
     return(_diseaseHistoryRepository.Add(history));
 }