I'm using NHibernate to map the following class to an Oracle database in my ASP.NET MVC application:
public class User
{
// Needs to be encrypted/decrypted when persisting
public virtual string Question { get; set; }
}
Following several examples that I've found, I would like to use an implementation of NHibernate's IUserType to transform my data when it is persisted to or retrieved from my database example.
Since I have already written an EncryptionService
class to handle data encryption in other parts of my application, I would like to inject it into my user type. Is there a way to perform constructor injection on an IUserType using Autofac?