Let's say I have something similar to this :
public class DataType
{
//For NHibernate
private DataType(){}
public DataType(string name, Type type, string defaultValue)
{
Name = name;
TypeOfContent = type;
DefaultInvariantStringValue = defaultValue;
}
public string Name { get; set; }
public Type TypeOfContent { get; set; }
public string DefaultInvariantStringValue { get; set; }
}
How do I map the property TypeOfContent with NHibernate (fluent mapping would be appreciated too)?
I would constrain Type to C# Built-In Types e.g. string, int, datetime, etc. So I would like to store System.String (for a string) in the database