Esempio n. 1
0
        public async Task <ActionResult <IEnumerable <PongResponse> > > GetAll([FromServices] IPingPongStore pingPong)
        {
            var query = await pingPong.GetAsync();

            var result = query.ToArray();

            return(Ok(PongResponse.MapFrom(result)));
        }
Esempio n. 2
0
        public async Task <ActionResult <PongResponse> > InsertSingle(string message, [FromServices] IPingPongStore pingPong)
        {
            var result = await pingPong.InsertAsync(new Ping(message));

            return(Ok(PongResponse.MapFrom(result)));
        }