Most voted "automapper" questions
None
Learn more…39 questions
Sort by count of
-
7
votes1
answer773
viewsHow to map two LIST properties using the Automapper
Registernewpessoacommand class public class RegisterNewPessoaCommand { public RegisterNewPessoaCommand(PessoaNatureza pessoaNatureza, PessoaFisica pessoaFisica, PessoaJuridica pessoaJuridica,…
-
6
votes1
answer4187
viewsHow to implement Automapper 5.0.2
I set up a project a while back, as follows, A Class called Automapperconfig as follows: public class AutoMapperConfig { public static void RegisterMappings() { Mapper.Initialize(x => {…
-
5
votes1
answer433
viewsAutomapper Entities Viewmodel
I am with a scenario where my context returns a query referring to two entities User and Cartaocreditousuario, as the following scenario below. During automapper action on my Viewmodel, is not…
-
3
votes1
answer211
viewsWhen mapping class to viewModel, some data is lost
I have an appointment that returns a client and his phone, but when mapping the class to the viewModel, I lose phone data: consultation: public Cliente ObterClientePorId(Guid ClienteId) { var…
-
3
votes1
answer3537
viewsDynamic mapping error: Missing type map Configuration 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…
-
3
votes1
answer400
viewsError accessing Automapper Createmap property 6.2.2
I’m practicing on a simple example I found on net on the subject. Only that I believe it is in an older version of AutoMapper and so I can’t access the property CreateMap when I call the class…
-
3
votes1
answer291
viewsIgnore Automapper property
I’m using Automapper version 7. I need to ignore a property that is in the result class and has no source class. As below. public class Contrato { public string Id{get;set;} public string Nome…
-
2
votes1
answer362
viewsHow to configure Automapper in a Windowsform project?
How do I set up Automapper in a Windows Forms app, being: Which file and should I configure to load together with the application and make it available? How to use with a simple example?…
-
2
votes1
answer1172
viewsHow to use Automapper 6.2.2 in Asp MVC5?
Hello, how to use Automapper 6.2.2 on Asp MVC5 to map my view models to the domain model. Example: in MVC I use Usuarioviewmodel and in the User domain.
-
2
votes2
answers5346
viewsAutomappermappingexception: Missing type map Configuration or Unsupported Mapping
I’m using the library Automapper to map my Viewmodels. I own my class Dbdominio: public class DBDominio { [Key] [Column("ID")] public long id { get; set; } [Required] [StringLength(128)]…
-
2
votes1
answer771
viewsHow to Implement Automapper 6.2.2
I’m following a tutorial in which classes are configured as follows: A class called Automapperconfig: public class AutoMapperConfig { public static void RegisterMappings() { Mapper.Initialize(x…
-
2
votes1
answer1998
viewsDependency Injection - Error: Invalidoperationexception: Unable to resolve service for type
Friends, once again I come to you for help. When trying to call an Action from my Controller I am getting the problem described below: An unhandled Exception occurred while Processing the request.…
-
1
votes1
answer409
viewsASP.NET MVC: Automapper and Nhibernate
Good night, I have a problem. I am using nhibernate to connect to my database and also use Automapper to map my Entities to my Viewmodel. But when I select the entity I have several relationships…
-
1
votes0
answers154
viewsThe number of generic arguments provided is not equal to the aridity of the generic type definition. Parameter name: instantiation
I am having a problem developing an application in Asp.net MVC with IOC, Automapper and all other screens work perfectly, just not that of Drivers. couldn’t identify the mistake, could you help me?…
-
1
votes1
answer248
viewsProblem with Many Interface Automapper for Many C#
I have two classes with a relation of many to many, all the mapping is already ready, the insertion is working, but when I try to do the Automapper it enters an infinite loop. Workflow: public class…
-
1
votes0
answers216
viewsAutomapper with related entity
Good afternoon, How to map the following entities public class Artista { public Artista() { ArtistaCategoria = new List<ArtistaCategoria>(); } public int ArtistaId { get; set; } public string…
-
1
votes2
answers184
viewsDDD Automapper with Linq Expression
I have a problem with automapper, when I pass a parameter in Linux Express, it seems that it does not make the exchange... decimal valor = 13; var model = service.Obter(x => x.DataRegistro == new…
-
1
votes0
answers208
viewsAutomapper error in relationship
I have the following classes: public class ListaGrupo : EntidadeBase { public ListaGrupo() { Items = new List<ListaGrupoItem>(); } public int Id { get; set; } public string Nome { get; set; }…
-
1
votes1
answer87
viewsAutomapper with Ioc
public class Vigencia { public DateTime DataInicialVigencia { get; set; } public DateTime DataFinalVigencia { get; set; } public Guid VeiculoId { get; set; } public Guid RastreadorId { get; set; } }…
-
1
votes0
answers62
viewsIgnore Icollection Automapper property does not work
I’m having trouble ignoring one property that’s like Icollection and another that’s like Generic Class. Type I am ignoring in Profile Map Address class, it works only when Map…
-
1
votes1
answer1981
viewsAutomappermappingexception: 'Error Mapping types. '
Could you help me with this mistake described in the title, please. I am using the Automapper in the same way in other classes and only in those classes is it making this mistake. I couldn’t…
-
1
votes1
answer103
viewsWhy does the model return null after using Automapper?
To model Endereco returns null after mapping (Automapper), why ? Example: using AutoMapper; using System; using System.Collections.Generic; using System.Linq; using System.Text; using…
-
1
votes1
answer47
viewsWhy can’t I map using Automapper?
I have a model called Client with many attributes and (for simplicity I put here only a few) I thought of creating Viewmodels to simplify the display of data in Views, the problem is that the…
-
0
votes0
answers49
viewsMap a Json to a Viewmodel via Automapper
I own the following Json (I’m betting just a piece of it). { "filters": {}, "competition": { "id": 2021, "area": { "id": 2072, "name": "England" }, "name": "Premier League", "code": "PL", "plan":…
-
0
votes0
answers49
viewsMapping Error and Fluent Api
I’ve just started the study on Asp.Net MVC with Entityframework, I’m having a go at saving the following case: public class Aluno { public int Codigo { get; set; } public string Nome { get; set; }…
-
0
votes0
answers265
viewsError with Automapper
i have trouble mapping child classes in automapper, qndo do viewModel for model. Has anyone ever had that kind of problem? thank you very much I’ll post the classes public class…
-
0
votes1
answer999
viewsDTO Assembler, how do you really use it?
I’m reading about DTO and tbm viewmodel in ASP.NET and wanted to do something like this in JAVA. If I’m not mistaken, DTO is a way to move data between layers in a specific way without having to…
-
0
votes1
answer444
viewsAutomapper Relationship one for many - Model to Viewmodel (and vice versa)
MVC scenario, where Controller talks to Application who talks to Domain. I’m trying to map one to many with Automapper. This is my Model: public class Estado { public Guid EstadoId { get; set; }…
-
0
votes1
answer42
viewsMap sub-property
I have three classes public class Ligacao { public string Guid { get; set; } public string Telefone { get; set; } public Status Status { get; set; } public string ArquivoJson { get; set; } public…
-
0
votes1
answer164
viewsError when deleting record with Entity Framework when mapping entity
When I try to delete a record from the Mapper (Model to Domain) have the following error as return from E.F: failed because Another Entity of the same type already has the same Primary key value.…
-
0
votes0
answers147
viewsProblems returning a Iqueryable<> list to convert it with Automapper
I have a function that returns me a list of people with their personal/legal relationships. I own a Personal Viewmodel that is already mapped in the Autommapper layer... When I call the Getjoinall()…
-
0
votes1
answer174
viewsIsolate presentation layer domain
Good software architecture practice says that the presentation layer does not You must know the domain layer. I’m trying to make this isolation between these layers, but the that is hindering this…
-
0
votes1
answer126
viewsHow to convert from List<> to Ilist<> using Automapper?
I need to convert a List to Ilist with automapper knowing that both are in different classes and one of them has a constructor. Is that possible? I’m using the Automapper 6.2.2. public class Pessoa…
-
0
votes1
answer167
viewsError When Mapping Idatareader with Automapper
I have this typing error when trying to map a Sqldatareader coming from a previous, mapping with Automapper Error An unhandled Exception of type 'Automapper.Automappermappingexception' occurred in…
-
0
votes0
answers40
viewsAutomapper mapping returns Zeroed values
I have the following problem, when executing a query of a procedure, its response to being mapped returns the values of the properties with null value. My Datareader with Automapper Mapping public…
-
0
votes0
answers162
viewsThe INSERT statement conflicted with the FOREIGN KEY constraint "Fk_dbo.Counter_dbo.Addresse_addressacoid"
I have two problems. I have the entity Accountant, Address and City. Every time I register a new one accountant, I have a dropdowlist who carries the cities so I can choose, the problem is that…
-
0
votes1
answer37
viewsAutomapper - Map a collection of strings to a collection property within a collection
Which doubt ? How to map Idcontributors (collection of strings) to a collection (Contributors), within the Taction collection, with a string property (Contributorid), using LINQ and autoMapper.…
-
0
votes1
answer46
viewsMap a property to Enum
I’m starting automapper studies so I don’t even know if I’m using the correct terms to ask the question, but here’s the thing. I have the class Patient that, among other properties, has an Enum…
-
-1
votes2
answers596
viewsI cannot initialize Automapper Settings 6.2.2 Asp.netcore 2.0
In my Application layer, I have the following classes: public class AutoMapperConfig { public static MapperConfiguration RegisterMappings() { return new MapperConfiguration(cfg => {…