21.02.2016, 15:52
Okay. I try use NHibernate
GameMode.cs
DbSession.cs
http://pastebin.com/ifVXPHjK
DbMappings.cs
http://pastebin.com/Sngj3HpR
After run server...
http://pastebin.com/EDKFeDC5
But connection string is ok. I get him from Visual Studio (I have plugin to use MySQL in Server Explorer)
GameMode.cs
Код:
using(ISession session = DbSession.OpenSession()) { session.Save(new PlayerM { Nick = "Test", Password = "Test123" }); var players = session.Query<PlayerM>(); foreach(var player in players) { Console.WriteLine(player.Nick); Console.WriteLine(player.Password); } }
http://pastebin.com/ifVXPHjK
DbMappings.cs
http://pastebin.com/Sngj3HpR
After run server...
http://pastebin.com/EDKFeDC5
But connection string is ok. I get him from Visual Studio (I have plugin to use MySQL in Server Explorer)