Skip to content

Commit

Permalink
Fix auto mapper issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ousiax committed Dec 12, 2023
1 parent dc106df commit 1d699fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Leo.Wpf.App/Mapper/LeoProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public LeoProfile()
CreateMap<CustomerViewModel, CustomerDto>().ReverseMap();
CreateMap<CustomerDetailViewModel, CustomerDetailDto>().ReverseMap();

CreateMap<NewCustomerViewModel, CustomerDto>().ReverseMap();
CreateMap<NewCustomerViewModel, CustomerDto>()
.ForMember(o => o.Id!, o => o.Ignore())
.ReverseMap();
CreateMap<NewCustomerDetailViewModel, CustomerDetailDto>().ReverseMap();
}
}
Expand Down

0 comments on commit 1d699fc

Please sign in to comment.