示例#1
0
        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));
        }
示例#2
0
        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());
        }