Beispiel #1
0
        public async Task <JsonResult> Delete(string id, string userId)
        {
            var result = await _tagAppService.Delete(id, userId);

            OutputModel outputModel = new OutputModel();

            outputModel.Data = result;
            return(new JsonResult(outputModel));
        }
Beispiel #2
0
        public IHttpActionResult DeleteTag(int id)
        {
            var tag = _tagAppService.Find(id);

            if (tag == null)
            {
                return(NotFound());
            }

            _tagAppService.Delete(id);

            return(Ok(tag));
        }
Beispiel #3
0
        public async Task <IActionResult> Delete([FromRoute] Guid id, CancellationToken token = default)
        {
            var result = await _service.Delete(id, token);

            if (result)
            {
                return(ApiNoContentResponse());
            }

            if (ScopeControl.HasNotification)
            {
                var notifications = ScopeControl.Notifications.MapToDictionary();
                return(BadRequest(ApiResult.Failure(notifications)));
            }

            return(NotFound());
        }
Beispiel #4
0
 public int Delete(int id)
 {
     return(_tagAppService.Delete(id));
 }