I'm new to FluentNHibernate. I am working with AutoMapping. Let's say, I have a database which is generated by NHibernate. There's a table, named Document with 2 columns
- Id: int
- Description: nvarchar(255)
which is mapped to this class
public class Document
{
public virtual int Id { get; set; }
public virtual string Description{ get; set; }
}
I want to change data type of Description from nvarchar(255) to text in Database, so I created a console application as follow:
public class Program
{
static void Main(string[] args)
{
Console.WriteLine("Start process");
AutoMap.AssemblyOf<Document>().Override<Document>(y => y.Map(x => x.Description).CustomSqlType("text"));
Console.WriteLine("End process");
}
}
There's no error, but nothing happened, the column Description is still nvarchar(255). I don't know what I am missing here. Any thought appreciated! Thanks