public IActionResult Delete(int id) { var t = new Trademark { Id = id, }; var result = _trademarkService.Delete(t); if (result.Success) { return(Ok(result.Message)); } return(BadRequest(result.Message)); }
public async Task <IActionResult> DeleteTrademark(int trademarkId) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await _trademarkService.Delete(trademarkId); if (!result.IsSuccessed) { return(BadRequest(result.Message)); } return(Ok()); }