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()); } }
public IHttpActionResult Delete(MasterUom data) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { _uomService.Delete(data); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }