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)); } }
public AnamneseController(IAnamneseService service) { _service = service; }