Пример #1
0
        public async Task <IActionResult> GetAllAsync()
        {
            var payments = await _paymentManager.GetAllAsync();

            var paymentDtos = _mapper.Map <IEnumerable <PaymentDto> >(payments);
            var links       = new CollectionLinks()
            {
                Self = HttpContext.Request.Path
            };

            return(Ok(new ResourceResponse()
            {
                Links = links, Data = paymentDtos
            }));
        }