Exemplo n.º 1
0
        public async Task <IActionResult> GetMember([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var member = await repo.GetMember(id);

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

            return(Ok(member));
        }