Skip to content

Commit

Permalink
[SPDBT-3390] Enable null update (#1910)
Browse files Browse the repository at this point in the history
# Description

This PR includes the following proposed change(s):

- [SPDBT-3390] Enable null update
  • Loading branch information
peggy-quartech authored Nov 28, 2024
1 parent 353008a commit 3a9c05c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Spd.Resource.Repository/BizLicApplication/Mappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ public Mappings()
CreateMap<SaveBizLicApplicationCmd, spd_application>()
.ForMember(d => d.statuscode, opt => opt.MapFrom(s => SharedMappingFuncs.GetApplicationStatus(s.ApplicationStatusEnum)))
.ForMember(d => d.spd_applicationid, opt => opt.MapFrom(s => s.LicenceAppId ?? Guid.NewGuid()))
.IncludeBase<BizLicApplication, spd_application>()
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
.IncludeBase<BizLicApplication, spd_application>();
//.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));

CreateMap<CreateBizLicApplicationCmd, spd_application>()
.ForMember(d => d.spd_applicationid, opt => opt.MapFrom(s => Guid.NewGuid()))
.ForMember(d => d.spd_submittedon, opt => opt.MapFrom(s => DateTimeOffset.UtcNow))
.IncludeBase<BizLicApplication, spd_application>()
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
.IncludeBase<BizLicApplication, spd_application>();
//.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));

_ = CreateMap<spd_application, BizLicApplicationResp>()
.ForMember(d => d.ContactId, opt => opt.MapFrom(s => s.spd_ApplicantId_contact.contactid))
Expand Down
2 changes: 1 addition & 1 deletion src/Spd.Utilities.Dynamics/ODataClientHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void OnClientCreated(ClientCreatedArgs args)
client.Configurations.RequestPipeline.OnEntryStarting((arg) =>
{
// do not send reference properties and null values to Dynamics
arg.Entry.Properties = arg.Entry.Properties.Cast<ODataProperty>().Where((prop) => !prop.Name.StartsWith('_') && prop.Value != null);
arg.Entry.Properties = arg.Entry.Properties.Cast<ODataProperty>().Where((prop) => !prop.Name.StartsWith('_') /*&& prop.Value != null*/);
});
client.BuildingRequest += Client_BuildingRequest;
client.SendingRequest2 += Client_SendingRequest2;
Expand Down

0 comments on commit 3a9c05c

Please sign in to comment.