Exemple #1
0
        public IActionResult Get(int id)
        {
            var groups       = ModelGenerator.GenerateGroupList();
            var matchedGroup = groups.FirstOrDefault(s => s.Id == id);

            if (matchedGroup != null)
            {
                return(Ok(matchedGroup));
            }

            return(NotFound());
        }
Exemple #2
0
        public IEnumerable <Group> Get()
        {
            var groups = ModelGenerator.GenerateGroupList();

            return(groups);
        }