Esempio n. 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));
        }
Esempio n. 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());
        }
Esempio n. 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"));
        }
        public async Task <IActionResult> Delete(int id)
        {
            var result = await _attributeService.Delete(id);

            return(Ok(result));
        }
 public IActionResult Delete(Guid id)
 {
     _attributeService.Delete(id);
     return(Ok());
 }