Example #1
0
        public HttpStatusCode DeleteAttributeGroup(int attributeGroupId)
        {
            var response = _attributeGroupRepository.DeleteAttributeGroup(attributeGroupId);

            switch (response)
            {
            case HttpStatusCode.OK:
                return(HttpStatusCode.OK);

            case HttpStatusCode.InternalServerError:
                return(HttpStatusCode.InternalServerError);

            default:
                return(HttpStatusCode.NotFound);
            }
        }
Example #2
0
        public IActionResult DeleteAttributeGroup(int attrGroupId)
        {
            var deletedAttrGroup = _attrGroupRepo.DeleteAttributeGroup(attrGroupId);

            return(RedirectToAction(nameof(Index)));
        }