diff --git a/Game/Habbos/Habbo.cs b/Game/Habbos/Habbo.cs index 8f8384a..f31cfd9 100644 --- a/Game/Habbos/Habbo.cs +++ b/Game/Habbos/Habbo.cs @@ -4,7 +4,6 @@ public class Habbo { public virtual uint Id { get; set; } public virtual string Username { get; set; } = null!; - public virtual string Password { get; set; } = null!; public virtual string Email { get; set; } = null!; public virtual DateTime AccountCreated { get; set; } public virtual DateTime? LastLogin { get; set; } diff --git a/Game/Habbos/HabboMap.cs b/Game/Habbos/HabboMap.cs index dbac501..58a66e6 100644 --- a/Game/Habbos/HabboMap.cs +++ b/Game/Habbos/HabboMap.cs @@ -10,7 +10,6 @@ public class HabboMap : ClassMap LazyLoad(); Id(h => h.Id).Column("id").GeneratedBy.Identity(); Map(h => h.Username).Column("username").Not.Nullable(); - Map(h => h.Password).Column("password").Not.Nullable(); Map(h => h.Email).Column("email").Not.Nullable(); Map(h => h.AccountCreated).Column("account_created").Not.Nullable(); Map(h => h.LastLogin).Column("last_login").Nullable(); diff --git a/Game/Settings/Setting.cs b/Game/Settings/Setting.cs index c1d099d..de7291d 100644 --- a/Game/Settings/Setting.cs +++ b/Game/Settings/Setting.cs @@ -2,6 +2,6 @@ namespace Tiger.Game.Settings; public class Setting { - public virtual string Key { get; set; } = string.Empty; - public virtual string Value { get; set; } = string.Empty; + public virtual string Key { get; set; } = null!; + public virtual string Value { get; set; } = null!; } \ No newline at end of file diff --git a/Game/Settings/SettingMap.cs b/Game/Settings/SettingMap.cs index 7943f17..1f467b2 100644 --- a/Game/Settings/SettingMap.cs +++ b/Game/Settings/SettingMap.cs @@ -1,13 +1,13 @@ -// using FluentNHibernate.Mapping; -// -// namespace Tiger.Game.Settings; -// -// public class SettingMap : ClassMap -// { -// public SettingMap() -// { -// Table("settings"); -// Id(s => s.Key).Column("skey").Not.Nullable(); -// Map(s => s.Value).Column("value").Not.Nullable(); -// } -// } \ No newline at end of file +using FluentNHibernate.Mapping; + +namespace Tiger.Game.Settings; + +public class SettingMap : ClassMap +{ + public SettingMap() + { + Table("settings"); + Id(s => s.Key).Column("skey").Not.Nullable(); + Map(s => s.Value).Column("value").Not.Nullable(); + } +} \ No newline at end of file diff --git a/Storage/NhSessionFactory.cs b/Storage/NhSessionFactory.cs index aecf6a6..03cf5d6 100644 --- a/Storage/NhSessionFactory.cs +++ b/Storage/NhSessionFactory.cs @@ -2,8 +2,9 @@ using System.Reflection; using FluentNHibernate.Cfg; using FluentNHibernate.Cfg.Db; using Microsoft.Extensions.Configuration; -using MySql.Data.MySqlClient; +using MySqlConnector; using NHibernate; +using NHibernate.Driver.MySqlConnector; namespace Tiger.Storage; @@ -26,7 +27,7 @@ public class NhSessionFactory : INhSessionFactory }; _sessionFactory = Fluently.Configure() - .Database(MySQLConfiguration.Standard.ConnectionString(stringBuilder.ToString()).ShowSql()) + .Database(MySQLConfiguration.Standard.ConnectionString(stringBuilder.ToString()).Driver()) .Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly())) .BuildSessionFactory(); } diff --git a/TigerEmu.csproj b/TigerEmu.csproj index dda2bd0..2fedcd8 100644 --- a/TigerEmu.csproj +++ b/TigerEmu.csproj @@ -18,7 +18,8 @@ - + +