The convention-based Auto Mapping feature of Fluent NHibernate. Not to be confused with AutoMapper, the convention-based object-to-object mapper.
Questions tagged [automapping]
251 questions
0
votes
1 answer
Automapper - Map list of string to list of object with string property
I have problem with automapper
Here I have two objects:
Object 1:
public class First
{
......
public IList ImportantList{ get; set; }
......
}
Object 2:
public class Second
{
.....
public IList…

Mateusz Duda
- 61
- 9
0
votes
1 answer
Is it possible to clear a save-process (EF/AutoMappIng)?
I'm using EF/Automapping. An error occurs with a Foreign Key. With a try...catch, I want to catch the error. And I want to go further by inserting / updating data.
But I have the idea the process stays in the same exception. It looks the same as…

user1531040
- 2,143
- 6
- 28
- 48
0
votes
1 answer
Is it possible to create in a lambda-function a dynamical field?
I have a function like this:
public CountryDto FindCountryByName(string name)
{
Country country = _countryRepository.GetAll().Where(g => g.Name.ToLower().Trim() == name.ToLower().Trim()).FirstOrDefault();
var dto = _mapper.Map

user1531040
- 2,143
- 6
- 28
- 48
0
votes
1 answer
Is it possible to refresh the data after insert?
I work with EF / AutoMapping. And I want after an Insert immediately the Id (PK) of the record.
How do you do that? Is it possible refreshing the data immediately after an insert?
public int InsertArtist(ArtistDto artistDto)
{
Artist entity =…

user1531040
- 2,143
- 6
- 28
- 48
0
votes
1 answer
fluent NHibernate automapping
Please, how can I do map a property of type one-to-many in fluent NHibernate through AutoMapping?
My entities are mapped like down there:

Rodrigo Reis
- 1,097
- 12
- 21
0
votes
1 answer
Automapper map from properties to classes
I'm having an issue from converting a simple class with properties to a class with properties which are also classes themselves called ProductDataField
public class ProductDataField
{
public string Value { get; set; }
…

daxtera
- 33
- 6
0
votes
1 answer
FluentNhibernate automapping a tree (recursive association)
I'm trying to automap a class Code. Codes can have (Sub)Codes.
public class Code
{
public virtual string Key{get;set;}
public virtual Code Parent{get; set;}
public virtual ICollection
SubCodes{get;set;}
private…

k.c.
- 1,755
- 1
- 29
- 53
0
votes
1 answer
.Net Core Automapper with many to many relationship problem
I am new with Automapper and I have a problem with mapping my classes which have many-to-many relationships.
I think I need something like nested mapping but the documentation does not seem for me clearly. I know that I am doing something wrong with…

Matteoni
- 87
- 1
- 11
0
votes
1 answer
Fluent nHibernate Auto Mapping - Issue with AutoMapping Override
I've just tried to get a project up and running with Fluent Automapping (I'm familiar with Fluent but used to write each of the maps)
I have an object ScriptType which has a ParseRules property
public class ScriptType : EntityBase
{
public…

Andy Clarke
- 3,234
- 5
- 39
- 66
0
votes
2 answers
How to get single table inheritance for a single class hierarchy
I use FluentNHibernate with AutoMapping to map my persistent classes.
The default Table per Sub-Class mapping works fine for almost all of my class hierarchies, except one: Here I have an abstract base class “A”, A has all the data fields needed. …

k.c.
- 1,755
- 1
- 29
- 53
0
votes
2 answers
Map a class instance to a list of another class with Automapper
Is it possible to map AddToClientCommand to List ?
public class AddToClientCommand : IRequest
{
public List AccountIds { get; set; }
public int ClientId { get; set; }
}
public class AddToClient
{
…

Dmitry Stepanov
- 2,776
- 8
- 29
- 45
0
votes
2 answers
AutoMapper: Map single object to IEnumerable/Collection of children while passing properties
I have the following two ShopifySharp objects.
public class Product
{
public string Title { get; set; }
public string BodyHtml { get; set; }
public IEnumerable Variants { get; set; }
}
public class…

Maxim Gershkovich
- 45,951
- 44
- 147
- 243
0
votes
0 answers
Fluent hibernate and automapper inheritance
I have three entities:
BaseEntity (Guid Id) Primary key (for all entities)
Person (Name, FamilyName) : BaseEntity
Employee (Salary) : Person
How to map Employee so that its Primary key was also a foreign key for Person?
Should I inherit from…

John
- 1,834
- 5
- 32
- 60
0
votes
1 answer
Using Fluent NHiberanate how do I turn off the mapping of a non persistent property
All my persistent objects have a property which should not be persisted.
At this moment i generate my automapping like this:
var autoMap =
AutoMap.AssemblyOf()
.Where(type => type.Namespace != null &&…

k.c.
- 1,755
- 1
- 29
- 53
0
votes
1 answer
Issue with returning mapped properties (.Net Core + Automapper Extensions 6.1)
Have Input model and Output model. Both contain a property - collection of AddressModel. After mapping - the returned result only contains values for AddressModel values, while main Output properties are blank (null). What am I doing…

Nat
- 630
- 1
- 5
- 17