We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Team,
I am using .Net Framework 4.6.1 Nuget:
But When I am Initializing SQLite NHibernate I am getting below error Can you please help me on that?
The requested collection ‘DataTypes’ is not defined.Microsoft.Data.Sqlite Refer Below code. private void BuildSessionFactory() { Microsoft.Data.Sqlite.SqliteConnection.ClearAllPools(); var cfg = new Configuration(); //var licenseCode = "YourLicenseCodeHere"; var _connection = (IDbConnection)new SqliteConnection($"Data Source=test.db;"); _connection.Open(); using (var command = _connection.CreateCommand()) { command.CommandText = $"PRAGMA cipher_license = '{liscense}';"; command.ExecuteNonQuery(); }
using (var command = _connection.CreateCommand()) { //PRAGMA key ='{key}'; command.CommandText = $"PRAGMA key = 'test@2024';"; command.ExecuteNonQuery(); } using (var command = _connection.CreateCommand()) { command.CommandText = "PRAGMA cipher_page_size = 4096"; command.ExecuteScalar(); } using (var command = _connection.CreateCommand()) { command.CommandText = "PRAGMA kdf_iter = 256000;"; command.ExecuteScalar(); } using (var command = _connection.CreateCommand()) { command.CommandText = "PRAGMA cipher_hmac_algorithm = HMAC_SHA512;"; command.ExecuteScalar(); } using (var command = _connection.CreateCommand()) { command.CommandText = "PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA512;"; command.ExecuteScalar(); } _connection.Close(); cfg.DataBaseIntegration(x => { x.ConnectionString = "Data Source=FIGMD.db;"; x.Driver<NHibernate.Extensions.Sqlite.SqliteDriver>(); x.Dialect<NHibernate.Dialect.SQLiteDialect>(); x.ConnectionProvider<NHibernate.Connection.DriverConnectionProvider>(); }); //NHibernate.Extensions.Sqlite.SqliteDriver sqlitedriver = new NHibernate.Extensions.Sqlite.SqliteDriver(); cfg.AddAssembly(typeof(Student).Assembly); var factory=cfg.BuildSessionFactory(); Factories.Add(factory); //NHibernate.Extensions.Sqlite.SqliteDriver sqliteDriver = new NHibernate.Extensions.Sqlite.SqliteDriver(); }
Exception thrown "var factory=cfg.BuildSessionFactory();" here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi Team,
I am using .Net Framework 4.6.1
Nuget:
But When I am Initializing SQLite NHibernate I am getting below error
Can you please help me on that?
The requested collection ‘DataTypes’ is not defined.Microsoft.Data.Sqlite
Refer Below code.
private void BuildSessionFactory()
{
Microsoft.Data.Sqlite.SqliteConnection.ClearAllPools();
var cfg = new Configuration();
//var licenseCode = "YourLicenseCodeHere";
var _connection = (IDbConnection)new SqliteConnection($"Data Source=test.db;");
_connection.Open();
using (var command = _connection.CreateCommand())
{
command.CommandText = $"PRAGMA cipher_license = '{liscense}';";
command.ExecuteNonQuery();
}
Exception thrown "var factory=cfg.BuildSessionFactory();" here.
The text was updated successfully, but these errors were encountered: