コード例 #1
0
        public async Task UpdateFund(FundModel fund)
        {
            var entity = await _fundRepository.GetById(fund.Id).Result();

            entity.Amount     = fund.Amount;
            entity.UpdatedBy  = fund.UpdatedBy;
            entity.UpdatedOn  = DateTime.UtcNow;
            entity.ApprovedBy = fund.ApprovedBy;
            entity.ApprovedOn = entity.ApprovedBy.HasValue ? (DateTime?)DateTime.UtcNow : null;
            entity.StatusId   = fund.StatusId;
            await _fundRepository.EditAsync(entity);
        }