Hi,
Sorry for the title, didn't know how to explain it in one line :)
Please take a look at the code below:
public class Person
{
public EMailAddress EMailAddress { get; set; }
public Age Age { get; set; }
}
public struct EMailAddress : ValueType<string>
{
public string Value { get; set; }
}
public struct Age : ValueType<int>
{
public string Value { get; set; }
}
public interface ValueType<TType>
{
TType Value { get; set; }
}
What I want to do is map the Value property of each ValueType in the
table instead of the actual ValueType. So my table would look the same
as if EMailAddress was a string and Age was an int. There is of course
a little bit more that I want to do except the Value but I kept it
like this for simplicity.
An other question is that I want NHibernate to create these entities
using a custom factory, but I guess that should go the the NHibernate
list, but would appreciate if someone could already tell me if it is
possible.
The reason for this is that I want to explore some ideas about
validation.
-Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---