public async Task <ActionResult <IEnumerable <PongResponse> > > GetAll([FromServices] IPingPongStore pingPong) { var query = await pingPong.GetAsync(); var result = query.ToArray(); return(Ok(PongResponse.MapFrom(result))); }
public async Task <ActionResult <PongResponse> > InsertSingle(string message, [FromServices] IPingPongStore pingPong) { var result = await pingPong.InsertAsync(new Ping(message)); return(Ok(PongResponse.MapFrom(result))); }