I have created my database by this sql query:
("CREATE DATABASE " + DBName + " DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci", connection)
And I have this fluent configuration:
Fluently.Configure()
.Database(MySQLConfiguration.Standard.ConnectionString(c => c.Server(server)
.Database(DBName).Username(username).Password(password)))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Program>())
.BuildSessionFactory();
How can I set NHibernate encoding in this configuration? or how can I set my mappings encoding?
I want to this because when I want to select with a property which has UTF8 encoding NHibernate sql will include ??????? in strings with encoding
1 Answer