コード例 #1
0
        public async Task <BorrowerDto> Update(BorrowerDto borrowerDto)
        {
            IBorrower borrower = await BorrowerFactory.FetchAsync(borrowerDto.Id);

            borrower.Position           = borrowerDto.Position;
            borrower.EDisclosureConsent = borrowerDto.EDisclosureConsent;
            borrower.EmailConsent       = borrowerDto.EmailConsent;
            borrower.EmailAddress       = borrowerDto.EmailAddress;

            borrower = await borrower.SaveAsync() as IBorrower;

            return(new BorrowerDto
            {
                PartnerId = borrower.PartnerId,
                CobranderId = borrower.CobranderId,
                SiteProfileId = borrower.SiteProfileId,
                AccountId = borrower.AccountId,
                Id = borrower.Id,
                Position = borrower.Position,
                EDisclosureConsent = borrower.EDisclosureConsent,
                EmailConsent = borrower.EmailConsent,
                EmailAddress = borrower.EmailAddress
            });
        }
コード例 #2
0
        public async Task <BorrowerDto> Insert(BorrowerDto borrowerDto)
        {
            IBorrower borrower = await BorrowerFactory.CreateAsync(new Tuple <Guid, Guid, Guid, Guid>(borrowerDto.PartnerId, borrowerDto.CobranderId, borrowerDto.SiteProfileId, borrowerDto.AccountId));

            borrower.Position           = borrowerDto.Position;
            borrower.EDisclosureConsent = borrowerDto.EDisclosureConsent;
            borrower.EmailConsent       = borrowerDto.EmailConsent;
            borrower.EmailAddress       = borrowerDto.EmailAddress;

            borrower = await borrower.SaveAsync() as IBorrower;

            return(new BorrowerDto
            {
                PartnerId = borrower.PartnerId,
                CobranderId = borrower.CobranderId,
                SiteProfileId = borrower.SiteProfileId,
                AccountId = borrower.AccountId,
                Id = borrower.Id,
                Position = borrower.Position,
                EDisclosureConsent = borrower.EDisclosureConsent,
                EmailConsent = borrower.EmailConsent,
                EmailAddress = borrower.EmailAddress
            });
        }