コード例 #1
0
        public async Task <IActionResult> GetBadgeAsync(int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var result = await _service.GetBadgeAsync(id);

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

            return(Ok(result));
        }