Questions tagged as 'automapper'

2
answers

Web API 2, OData v4 and Automapper

I have a problem that I have no idea how I can fix it. I have a class as follows: public class Message { public long Id { get; set; } public DateTime DateCreated { get; set; } public DateTime DateModified { get; set; }...
asked by 11.12.2015 / 00:25
1
answer

Automapper how to implement correctly

I am using automapper 7 but the documentation of this version is not very explicit I have implemented in this way. 1) I declare at the class level. private MapperConfiguration _config; 2) Implement in this way to map from one entity to a...
asked by 17.10.2018 / 22:12
0
answers

Error installing AutoMapper in VS 2012

I am using Visual Studio 2012, NET Framework 4.6.1, when I try to install AutoMapper I get the following error. PM> Install-Package AutoMapper Install-Package : 'AutoMapper' ya tiene una dependencia definida para 'NETStandard.Library'. En...
asked by 05.12.2016 / 01:10
1
answer

Applying automapper

Hi, I have a method in which I apply automation but I get the following error: Unable to convert the DGVdto type with SupplierExtend implicitly If both have the same properties. public class ProveedorExtend { public int Id { get; set; }...
asked by 26.04.2016 / 20:03
1
answer

C # - Automapper :: convert object to a complex object

I have the following Request and Response structure: public class Action { public class Create { public class Request { public string operationdate { get; set; } public string action { get; set;...
asked by 18.12.2018 / 16:31
1
answer

Automapper ignore null values

I'm using AutoMapper, the point is that I do not want to map the null values, since I want to keep the value of the target entity members. I've done it this way but it does not work. opts.Condition((source, dest, sourceMember, destMember)=>...
asked by 06.12.2018 / 01:44
0
answers

.Net - Problems when using AutoMapper in WebApi

I am trying to mount AutoMapper on my WebApi but it gives me an error. I have loaded the libraries with nuget and I have put the following lines. In the WebApiConfig.cs file I include the following: Mapper.Initialize(cfg => { cfg.Add...
asked by 22.08.2018 / 09:47
1
answer

AutoMapper does not convert empty lists well

There is a problem with the AutoMapper, when mapping an empty list, it is entrusted to a list with Count = 0, regardless of whether the configuration is specified that the values are not taken into account = null link code: using Syste...
asked by 15.12.2017 / 12:08