UserManagement fixed : DbType = DBType.MySql

This commit is contained in:
Milan Hanajik 2022-04-05 10:10:56 +02:00
parent 2a26da6337
commit 96a86a04da
5 changed files with 14 additions and 13 deletions

View File

@ -27,11 +27,11 @@ namespace Config
switch (dbType) switch (dbType)
{ {
default: default:
case Common.DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
case Common.DBType.MySql: case Common.DBType.MySql:
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString)); cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
break;
case Common.DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break; break;
} }

View File

@ -64,12 +64,12 @@ namespace Events
switch (dbType) switch (dbType)
{ {
default: default:
case DBType.SQLite: case DBType.MySql:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
case DBType.MySql:
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString)); cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
break; break;
case DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
} }
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.Event>()); cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.Event>());

View File

@ -95,6 +95,7 @@ namespace UserManagement
try try
{ {
Users.DB.ConnectionString = Program.LocalSettings.ConnectionString; Users.DB.ConnectionString = Program.LocalSettings.ConnectionString;
Users.DB.DbType = Common.DBType.MySql;
Users.DB.LoadSharedData(); Users.DB.LoadSharedData();
authorized = true; /// No LoginDlg, authorized when reading users from the DB is successfull authorized = true; /// No LoginDlg, authorized when reading users from the DB is successfull

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.25.1400.0")] [assembly: AssemblyVersion("2.27.1873.0")]
[assembly: AssemblyFileVersion("2.25.1400.0")] [assembly: AssemblyFileVersion("2.27.1873.0")]

View File

@ -61,13 +61,13 @@ namespace Users
switch (dbType) switch (dbType)
{ {
default: default:
case DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
case DBType.MySql: case DBType.MySql:
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString)); cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
break; break;
} case DBType.SQLite:
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
break;
}
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.User>()); cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.User>());