コード例 #1
0
        public async Task <IActionResult> Delete(string id)
        {
            var result = await _attributeService.Delete(CurrentUser.TenantId, id);

            if (result.Code <= 0)
            {
                return(BadRequest(result));
            }
            return(Ok(result));
        }
コード例 #2
0
        public async Task <IActionResult> Delete([FromRoute] int id)
        {
            bool result = await _attributeServices.Delete(id);

            if (result == true)
            {
                return(Ok("Successfully Deleted."));
            }
            return(NotFound());
        }
コード例 #3
0
        public virtual ActionResult DeleteAttribute(long?id)
        {
            if (id == null)
            {
                return(Content(null));
            }
            var attribute = _attributeService.GetAttributeById(id.Value);

            if (attribute == null)
            {
                return(Content(null));
            }
            var category = _categoryService.GetCategoryWithChildrenById(id.Value);

            _attributeService.Delete(id.Value);
            DeleteAttributeFromChildrenOfCategory(category, attribute.Name);
            return(Content("ok"));
        }
コード例 #4
0
        public async Task <IActionResult> Delete(int id)
        {
            var result = await _attributeService.Delete(id);

            return(Ok(result));
        }
コード例 #5
0
 public IActionResult Delete(Guid id)
 {
     _attributeService.Delete(id);
     return(Ok());
 }