コード例 #1
0
        public async Task <ActionResult> GetAll([FromServices] IAnamneseService service)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                return(Ok(await _service.GetAll()));
            }
            catch (ArgumentException e)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message));
            }
        }
コード例 #2
0
 public AnamneseController(IAnamneseService service)
 {
     _service = service;
 }