Пример #1
0
        public IActionResult Get()
        {
            var result = _TransactionAppService.GetAll()
                         .Select(c => new TransactionViewModel {
                Id          = c.Id,
                Approve     = c.Approve,
                DepWithType = c.DepWithType,
                UserId      = c.UserId,
                Quantity    = c.Quantity,
                IP          = c.IP,
                CreatedDate = c.CreatedDate,
                UpdatedDate = c.UpdatedDate,
                UserName    = _userManager.FindByIdAsync(c.UserId.ToString()).Result.UserName
            });

            return(Response(result));
        }
        public async Task <IActionResult> GetAll()
        {
            var result = await appService.GetAll();

            if (!result.Any())
            {
                return(NotFound());
            }

            return(Ok(result));
        }
Пример #3
0
        public void GetAll_test()
        {
            ITransactionAppService appService = GetService();

            appService.GetAll();
        }
Пример #4
0
 public IActionResult Get()
 {
     return(Response(_TransactionAppService.GetAll()));
 }