I'm new to Fluent NHibernate, and have what I think should be a simple question. The problem is that I can't seem to find a simple answer anywhere.
I have a database column that is an nvarchar
(SQL Server). It should map to a model property that is a System.Uri
. The problem is that string
doesn't implicitly convert to Uri
. Is there a way to "intercept" the setting of the property to use custom logic?
Map(x => x.WebAddress); // WebAddress in the DB is nvarchar, and it's a System.Uri in the model
// would like to find something like what I have below
Map(x => x.WebAddress).Intercept<string, Uri>(y => new Uri(y));
What am I missing?