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)); }
public async Task <IActionResult> Delete([FromRoute] int id) { bool result = await _attributeServices.Delete(id); if (result == true) { return(Ok("Successfully Deleted.")); } return(NotFound()); }
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()); }