AutoMapper vs ValueInjecter [closed]

as the creator of ValueInjecter, I can tell you that I did it because I wanted something simple and very flexible I really don’t like writing much or writing lots of monkey code like: Prop1.Ignore, Prop2.Ignore etc. CreateMap<Foo,Bar>(); CreateMap<Tomato, Potato>(); etc. ValueInjecter is something like mozilla with it’s plugins, you create ValueInjections and use them … Read more

Where to place AutoMapper.CreateMaps?

Doesn’t matter, as long as it’s a static class. It’s all about convention. Our convention is that each “layer” (web, services, data) has a single file called AutoMapperXConfiguration.cs, with a single method called Configure(), where X is the layer. The Configure() method then calls private methods for each area. Here’s an example of our web … Read more

AutoMapper: “Ignore the rest”?

From what I understood the question was that there are fields on the destination which doesn’t have a mapped field in the source, which is why you are looking for ways to Ignore those non mapped destination fields. Instead of implementing and using these extension method you could simply use Mapper.CreateMap<sourceModel, destinationModel>(MemberList.Source); Now the automapper … Read more

How to set up Automapper in ASP.NET Core

I figured it out! Here’s the details: Add the main AutoMapper Package to your solution via NuGet. Add the AutoMapper Dependency Injection Package to your solution via NuGet. Create a new class for a mapping profile. (I made a class in the main solution directory called MappingProfile.cs and add the following code.) I’ll use a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)