public IActionResult DeleteSubgroup(int groupId, int id)
        {
            if (!_registrationRepository.GroupExists(groupId))
            {
                return(NotFound());
            }

            var subgroupEntity = _registrationRepository.GetSubgroup(groupId, id);

            if (subgroupEntity == null)
            {
                return(NotFound());
            }

            _registrationRepository.DeleteSubgroup(subgroupEntity);

            if (!_registrationRepository.Save())
            {
                return(StatusCode(500, "A problem happened while handling your request."));
            }

            return(NoContent());
        }