-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSP-7296 : Create/Edit Sales Details (Disposition) #3731
Changes from all commits
f0b82c4
bab2216
22bab57
924c1c7
43c16ed
b5a75ce
1fbd115
3cab88b
214137d
276ad39
cefc418
3584893
19f8f0b
40a7ed5
b7d89a0
92fe02a
9828c1b
76a2207
1f117ad
4137221
d86a132
305ea7a
5a0dafc
78a7b43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Mapster; | ||
using Entity = Pims.Dal.Entities; | ||
|
||
|
@@ -22,8 +24,8 @@ public void Register(TypeAdapterConfig config) | |
.Map(dest => dest.SppAmount, src => src.SppAmt) | ||
.Map(dest => dest.RemediationAmount, src => src.RemediationAmt) | ||
.Map(dest => dest.DispositionPurchasers, src => src.PimsDispositionPurchasers) | ||
.Map(dest => dest.DispositionPurchaserAgents, src => src.PimsDspPurchAgents) | ||
.Map(dest => dest.DispositionPurchaserSolicitors, src => src.PimsDspPurchSolicitors); | ||
.Map(dest => dest.DispositionPurchaserAgent, src => src.PimsDspPurchAgents.FirstOrDefault()) | ||
.Map(dest => dest.DispositionPurchaserSolicitor, src => src.PimsDspPurchSolicitors.FirstOrDefault()); | ||
|
||
config.NewConfig<DispositionFileSaleModel, Entity.PimsDispositionSale>() | ||
.Map(dest => dest.DispositionSaleId, src => src.Id) | ||
|
@@ -40,8 +42,8 @@ public void Register(TypeAdapterConfig config) | |
.Map(dest => dest.SppAmt, src => src.SppAmount) | ||
.Map(dest => dest.RemediationAmt, src => src.RemediationAmount) | ||
.Map(dest => dest.PimsDispositionPurchasers, src => src.DispositionPurchasers) | ||
.Map(dest => dest.PimsDspPurchAgents, src => src.DispositionPurchaserAgents) | ||
.Map(dest => dest.PimsDspPurchSolicitors, src => src.DispositionPurchaserSolicitors); | ||
.Map(dest => dest.PimsDspPurchAgents, src => src.DispositionPurchaserAgent == null ? null : new List<DispositionSalePurchaserAgentModel> { src.DispositionPurchaserAgent }) | ||
.Map(dest => dest.PimsDspPurchSolicitors, src => src.DispositionPurchaserSolicitor == null ? null : new List<DispositionSalePurchaserSolicitorModel> { src.DispositionPurchaserSolicitor }); | ||
Comment on lines
+45
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks odd. why would the ef entities be expecting a list but the model only contain one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Entities per the scaffolding are one to many, (which is not true) the relationship should be 1 to 1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, thats not good. If we need db changes does Dough know? |
||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding unit tests for controllers is pretty quick, can you please add the minimal amount to allow for test coverage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated