English 中文(简体)
automapping nested components naming conventions
原标题:

Im making the switch from Fluent Mapping to Automapping in my current project.

If I have the following domain:

public class Matter{
  public Client Client{get;set;}
}

public class Client {
    public Name Name{get;set;}
}

public class Name{
    public string FirstName{get;set;}
    public string LastName{get;set;}
}

When Automapping this model, the column names for the Name component are expected to be:

Name_FirstName
Name_LastName 

(i already have an underscore convention).

Is there a convention I could implement that would get the automapper to generate column names like:

Client_Name_FirstName
Client_Name_LastName

I hope ive described that effectively.

Cheers, Byron

问题回答

Sorry to pick up an old message but for the sake of others coming from a search engine perhaps http://wiki.fluentnhibernate.org/Conventions is what you re after?





相关问题
Does Fluent NHibernate support "trigger-identity"

I posted the question in the Fluent-NHibernate newgroup but so far there has been no answer from the void. Is there a Fluent NHibernate mapping for the NHibernate "trigger-identity" method of ...

automapping nested components naming conventions

Im making the switch from Fluent Mapping to Automapping in my current project. If I have the following domain: public class Matter{ public Client Client{get;set;} } public class Client { ...

NHibernate Search in a List using ICriteria

I have my class X : public class ClassX { public virtual IList<ClassY> ListY { get; set; } ... } My ClassX mapping (using Fluent) ... HasMany<ClassX>(x => x.ListY ) ....

Fluent nHibernate keeps recreating my database, why?

I m trying to convert my data layer from Linq2Sql to nHibernate. I think Xml the configuration in nHibernate is pretty backwards so I m using Fluent. I ve managed to get fluent, add in a repository ...

How to fluent-map this (using fluent nhibernate)?

I have two tables in my database "Styles" and "BannedStyles". They have a reference via the ItemNo. Now styles can be banned per store. So if style x is banned at store Y then its very possible that ...

热门标签