public IActionResult GetGroups() { try { var groups = new GroupsService(_context).GetGroups(); if (!groups.Any()) { return(NotFound()); } return(Ok(groups)); } catch (System.Exception) { throw; } }