Questions tagged as 'automapper'

1
answer

How to implement AutoMapper 5.0.2

I set up a project a while back, as follows, A class named AutoMapperConfig as follows: public class AutoMapperConfig { public static void RegisterMappings() { Mapper.Initialize(x => { x.AddProfile<D...
asked by 28.07.2016 / 05:10
1
answer

AutoMapper Entities ViewModel

I have a scenario where my context returns a query for two User and CardCreditoUsuario entities, according to the following scenario below. During automapper action in my ViewModel, it is not mapping the entity CardCreditoUsuario for its prope...
asked by 01.12.2016 / 22:42
1
answer

When mapping class to viewModel, some data is lost

I have a query that returns a client and its phone, but when mapping the class to the viewModel , I lose the phone data: query: public Cliente ObterClientePorId(Guid ClienteId) { var consulta = Contexto.Cliente.Join(Conte...
asked by 27.08.2015 / 20:18
1
answer

Error in dynamic mapping: Missing type mapping or unsupported mapping

I have a data dictionary something like this: public class Colunas { public string ColunaOrigem {get; set;} public string ColunaDestino {get; set;} public DbType Tipo {get; set;} } public class Tabela { public string Nome {get; s...
asked by 21.08.2017 / 15:22
0
answers

How to map two LIST properties using Automapper

RegisterNewPessoaCommand Class public class RegisterNewPessoaCommand { public RegisterNewPessoaCommand(PessoaNatureza pessoaNatureza, PessoaFisica pessoaFisica, PessoaJuridi...
asked by 11.09.2018 / 03:11
1
answer

How to Deploy AutoMapper 6.2.2

I'm following a tutorial in which classes are configured as follows: A class named AutoMapperConfig: public class AutoMapperConfig { public static void RegisterMappings() { Mapper.Initialize(x => {...
asked by 20.03.2018 / 18:40
1
answer

Error accessing the CreateMap property of AutoMapper 6.2.2

I'm practicing on a simple example that I found in net on the subject. I just believe that it is in an older version of AutoMapper and therefore I can not access the CreateMap property when I call the Mapper class. It look...
asked by 08.12.2017 / 22:39
1
answer

How to configure AutoMapper in a WindowsForm project?

How do I configure AutoMapper in a Windows Forms App, where: Which file should I configure to load with the application and be available? How to use with a simple example?
asked by 10.11.2017 / 14:39
2
answers

AutoMapper.AutoMapperMappingException: Missing type mapping or unsupported mapping

I'm using the AutoMapper library to map my ViewModels. I have my DBdomain class: public class DBDominio { [Key] [Column("ID")] public long id { get; set; } [Required] [StringLength(128)]...
asked by 15.10.2015 / 18:07
1
answer

How to use AutoMapper 6.2.2 in Asp MVC5?

Hello, how to use AutoMapper 6.2.2 in Asp MVC5 to map my view models to the domain model. Example: In MVC I use UserViewModel and User domain.     
asked by 14.12.2017 / 12:22