コード例 #1
0
        public DepositListByOwnerListForVm ViewDepositsByOwnerName(string piceOfName)
        {
            var deposits = _depositRepository.GetAllDepositsByPiceOfName(piceOfName)
                           .ProjectTo <DepositByOwnerVm>(_mapper.ConfigurationProvider).ToList();

            DepositListByOwnerListForVm listOfDepositsByOwner = new DepositListByOwnerListForVm()
            {
                Count          = deposits.Count,
                DepositByOwner = deposits
            };

            return(listOfDepositsByOwner);
        }
コード例 #2
0
        public DepositListByOwnerListForVm ViewDepositsByOwnerId(int ownerId)
        {
            var deposits = _depositRepository.GetDepositByOwnerId(1)
                           .ProjectTo <DepositByOwnerVm>(_mapper.ConfigurationProvider).ToList();

            DepositListByOwnerListForVm result = new DepositListByOwnerListForVm()
            {
                Count          = deposits.Count,
                DepositByOwner = deposits
            };

            return(result);
        }