ImplementingAdvancedRESTfulConcernsAspNetCore3 icon indicating copy to clipboard operation
ImplementingAdvancedRESTfulConcernsAspNetCore3 copied to clipboard

Replace/remove PropertyMappingService

Open michiproep opened this issue 3 years ago • 6 comments

Hi @KevinDockx , I'm just curious if you see a problem to remove or change the PropertyMappingService since we got the same information in AutoMapper. May-be, there is a way to utilize "mapper.ConfigurationProvider.Internal().GetAllTypeMaps()" instead of mapping all properties twice - once in profiles and once in PropertyMappingService.

Michael

michiproep avatar Oct 14 '22 08:10 michiproep

Hi Michael,

I'd actually prefer that :-) That said, I remember looking into how I could use AutoMapper for this and didn't find an intended way of achieving it... therefore I resorted to writing something myself. But if you can get it to work, by all means: use (and share ;-)) it! :)

KR, Kevin

KevinDockx avatar Oct 14 '22 14:10 KevinDockx

Hi @michiproep

can you please check this on your end if it works? :)

https://github.com/KevinDockx/ImplementingAdvancedRESTfulConcernsAspNetCore3/issues/9#issue-1415112239

Khungersumit avatar Oct 20 '22 01:10 Khungersumit

Hi @Khungersumit , not 100% sure what you mean? Are you talking about this issue or the #9 ? For #9 , I cannot find the class CreateAuthorRequest in the this repo, so I guess, there are more changes made in #9

michiproep avatar Oct 20 '22 05:10 michiproep

It is very hard to get a reply from @KevinDockx , He usually takes too much time to respond to the users who have subscribed to his courses 😏

https://github.com/KevinDockx/ImplementingAdvancedRESTfulConcernsAspNetCore3/issues/9#issue-1415112239

Khungersumit avatar Oct 20 '22 05:10 Khungersumit

CreateAuthorRequest

Hi @michiproep

You can use your existing class, I gave my custom naming here.

Just add a new property in this XML request and the same property in your requestDto and see the Binding of new property as I expained with the screenshot in https://github.com/KevinDockx/ImplementingAdvancedRESTfulConcernsAspNetCore3/issues/9#issue-1415112239 image

Khungersumit avatar Oct 20 '22 05:10 Khungersumit

It is very hard to get a reply from @KevinDockx , He usually takes too much time to respond to the users who have subscribed to his courses 😏

#9 (comment)

That's because I'm busy creating new versions of courses asked for by users ;-) But anyway, notifying me like this or on Twitter tends to do the trick - I had a look, see original post.

KevinDockx avatar Oct 20 '22 07:10 KevinDockx