Example #1
0
        public async Task <IActionResult> Get(int applicationGroupId)
        {
            if (!await _groupRepository.Exists(applicationGroupId))
            {
                return(NotFound());
            }

            return(Json(await _applicationRepository.Get(applicationGroupId)));
        }
        public async Task <IActionResult> Get(int id)
        {
            try
            {
                if (!await _groupRepository.Exists(id))
                {
                    return(NotFound());
                }

                return(Json(await _groupRepository.Get(id)));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }