public void TestInitialise() { var bucketRepo = new BucketBucketRepoAlwaysFind(); var accountRepo = new InMemoryAccountTypeRepository(); var subject = new Mapper_LedgerBucketDto_LedgerBucket(bucketRepo, accountRepo, new LedgerBucketFactory(bucketRepo, accountRepo)); Result = subject.ToDto(TestData); }
partial void ToModelPostprocessing(LedgerBucketDto dto, ref LedgerBucket model) { model.BudgetBucket = this.bucketRepo.GetByCode(dto.BucketCode); model.StoredInAccount = this.accountTypeRepo.GetByKey(dto.StoredInAccount); }
partial void ToDtoPostprocessing(ref LedgerBucketDto dto, LedgerBucket model) { dto.BucketCode = model.BudgetBucket.Code; dto.StoredInAccount = model.StoredInAccount.Name; }
// ReSharper disable once RedundantAssignment partial void ModelFactory(LedgerBucketDto dto, ref LedgerBucket model) { model = this.bucketFactory.Build(dto.BucketCode, dto.StoredInAccount); }
partial void ToModelPostprocessing(LedgerBucketDto dto, ref LedgerBucket model) { model.BudgetBucket = this.bucketRepo.GetByCode(dto.BucketCode); model.StoredInAccount = this.accountTypeRepo.GetByKey(dto.StoredInAccount); }
partial void ToDtoPostprocessing(ref LedgerBucketDto dto, LedgerBucket model) { dto.BucketCode = model.BudgetBucket.Code; dto.StoredInAccount = model.StoredInAccount.Name; }
// ReSharper disable once RedundantAssignment partial void ModelFactory(LedgerBucketDto dto, ref LedgerBucket model) { model = this.bucketFactory.Build(dto.BucketCode, dto.StoredInAccount); }