コード例 #1
0
        public async Task <ActionResult> DeleteAsync(Guid id)
        {
            await _rulesService
            .DeleteAsync(id);

            return(Accepted());
        }
コード例 #2
0
      public async Task <IActionResult> DeleteAsync(int id)
      {
          var result = await _ruleService.DeleteAsync(id);

          if (result == null)
          {
              return(BadRequest(result.Message));
          }

          return(Ok(result.Message));
      }
コード例 #3
0
        public async Task <IActionResult> DeleteRule(int id)
        {
            var result = await _ruleService.DeleteAsync(id);

            if (!result.Success)
            {
                return(BadRequest(result.Message));
            }

            return(NoContent());
        }
コード例 #4
0
        public async Task <IActionResult> DeleteRuleAsync([FromRoute] int id)
        {
            await service.DeleteAsync(id);

            return(new OkResult());
        }