Category "automapper"

Automapper profile maps its props to my dto

Hi. I want just map entity to dto but profile props map to the dto. Now what can i do for the following problem? public abstract class DtoProfile<TEntity

How to use Automapper to project object to Dto in LINQ

I am working on .NET Core 6 along with EF Core. I want to convert Customer and Order object that I have inside LINQ select to CustomerDto and OrderDto using Pro

How to setup AutoMapper in ASP.Net Core 6

How to configure AutoMapper in ASP.Net Core 6 I have a project which is written in .Net 3.1 so we had Startup.cs class. I am migrating it to .net core 6 now whe

AutoMapper .NET6 C#10 Blazor WASM PWA

I had a problem that the AutoMapper worked in .NET5 with in Program.cs -> services.AddAutoMapper(typeof(Startup)); New Blazored WASM PWA do not have a Startu

AutoMapper - Trying to flatten my object property to string but getting an error

I am trying to map my ProductDto to Product class. I get an error when mapping the string property in ProductDto class to a Brand property in the Product class.

Simple way to add extra parameter to Automapper ForMember

So, I have a mapping ObjectFrom to ObjectTo. ' All mappings can be done ObjectFrom.propX -> ObjectTo.propX2. But there is also a property in ObjectTo that ne

How can I pass parameters to an AutoMapper Profile in ABP?

I need to customize the way MyAutoMapper profile maps my objects to DTOs. From one of my ApplicationServices, I use an ObjectMapper for a relatively simple mapp

Update Entity from ViewModel in MVC using AutoMapper

I have a Supplier.cs Entity and its ViewModel SupplierVm.cs. I am attempting to update an existing Supplier, but I am getting the Yellow Screen of Death (YSOD)

Cannot convert lambda expression to type 'IValueResolver<Entity, MyDto, object>' because it is not a delegate type

I am trying to define this simple mapping in my profile CreateMap<CompanyClient, MyDto>() .ForMember( dto => dto.PaymentTerms, opt => opt.M

AutoMapper convert from multiple sources

Let's say I have two model classes: public class People { public string FirstName {get;set;} public string LastName {get;set;} } Also have a class Phone:

Automapper:Converting JSON to list of objects

Source Object (JSON, using JSON.NET if it matters): { "conum" : 1001, "name" : "CLN Industries Corporation", "agencyName" : "Murphy, Holmes & A

Problem in Azure DevOps pipeline restoring AutoMapper NuGet package in .net 6

I get the following error message when my pipeline is being run: Package AutoMapper.Extensions.Microsoft.DependencyInjection 8.1.1 is not compatible with net60

automapper map interface to interface or object

How to map objects inherited from one interface to objects inherited from another interface. I have such code structure public interface IDataTranslatable {