コード例 #1
0
        public IHttpActionResult Delete(long id, string updatedBy)
        {
            try
            {
                _uomService.Delete(id, updatedBy);
                Log.Info($"{typeof(UomController).FullName}||{UserEnvironment}||Delete record successful.");

                return(Content(HttpStatusCode.OK, "Uom deleted"));
            }
            catch (Exception ex)
            {
                return(BadRequest());
            }
        }
コード例 #2
0
 public IHttpActionResult Delete(MasterUom data)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     try
     {
         _uomService.Delete(data);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }