Q:
Fluent NHibernate 2.0 - Maps MapKey
I'm using Fluent NHibernate 2.0 and I'm having some issues with my code generation. I have a User table with a unique identifier for the user's Login. When I create a new User, I want to generate code that looks like:
public virtual Login UserLogin {get;set;}
However, my model is like this:
Map(x => x.UserLogin).Column("UserLogin");
and this generates code that looks like:
public virtual Login UserLogin { get; set; }
Is there any way that I can generate code that matches the above? I need this as part of my data access layer. I can't manually put the attribute on the property.
I should add that my UserLogin property has another property called UserId, which I'm using to create the Login.
A:
So it turns out that the easy way was to use fluent nhibernate to generate the mapping. I'm not sure why the automapper does not use an attribute to generate this.
Due to the COVID-19 outbreak, our team is temporarily closed.
If you have any questions regarding this, please contact us at info@moniez.com.
Stay safe and healthy!
The Moniez team
What’s new?
The Moniez team is now live on telegram. We had to change our website but don’t worry, we will soon update our product on your site. We will update you every time we’ll make a new update. If you’re already on our telegram channel, you’ll be automatically subscribed to the website.
From now, it’s possible to find out live the prices of the Moniez token on Changelly.
You can also now use coinswitch.io to exchange the Moniez token for ETH and BTC.Puma rodeliensis
Puma rodeliensis is an extinct species of Puma. Described by Fischer in 1884, it is represented by one isolated upper canine. It was originally assigned to the genus Puma by Thomas Huxley, who described P. rodeliensis. Fischer later placed it in its own genus, the species Puma minolens, which
Related links:
Comments