// See https://aka.ms/new-console-template for more information
using CloudGaming.Model.DbSqlServer.Db_Phone;
using CloudGaming.Model.DbSqlServer.Db_User;
using CloudGaming.DtoModel.Account.Login;
using Microsoft.EntityFrameworkCore;

using Newtonsoft.Json;
//var jsopn = JsonConvert.SerializeObject(new PhoneLoginParams());
//Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;
//var optionsBuilder = new DbContextOptionsBuilder<CloudGamingPhoneContext>();
//var option = optionsBuilder.UseSqlServer("Server=192.168.195.6;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;").Options;
//CloudGamingPhoneContext cloudGamingPhoneContext = new CloudGamingPhoneContext(option);
////cloudGamingPhoneContext.Database.EnsureCreated();
//var x = cloudGamingPhoneContext.T_GameCBT.Count();
//var ccc = cloudGamingPhoneContext.T_Epg_Cfg.ToList();
//Console.WriteLine("查询" + x.ToString());
//Console.ReadKey();
//Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;
var optionsBuilder1 = new DbContextOptionsBuilder<CloudGamingUserContext>();
var option1 = optionsBuilder1.UseSqlServer("Server=192.168.195.6;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;").Options;
CloudGamingUserContext cloud = new CloudGamingUserContext(option1);
var xxx = cloud.T_User.Count();
Console.WriteLine("查询" + xxx.ToString());
Console.ReadKey();
//cloud.Database.EnsureCreated();
//cloud.Database.