[성현모] EFCore 기능 추, dll 버전 추가
This commit is contained in:
@ -1,29 +0,0 @@
|
||||
using Azure.Core;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HubX.Library.DataBase
|
||||
{
|
||||
public class DBManager
|
||||
{
|
||||
public DBManager()
|
||||
{
|
||||
}
|
||||
|
||||
public async Task Insert<T>(T context) where T : DbContext
|
||||
{
|
||||
//using (var transaction = await context.CreateTransactionAsync())
|
||||
//{
|
||||
// if (context.TCertificates.ToList().Exists(x => x.CCuid == tbscsr.CCuid) == false)
|
||||
// {
|
||||
// await context.AddAsync(certificate);
|
||||
// }
|
||||
// transactionResult = await context.CloseTransactionAsync(transaction);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Projects/HubX/HubX.Library/Http/Packet/Packet.cs
Normal file
25
Projects/HubX/HubX.Library/Http/Packet/Packet.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using DB.HubXDB;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HubX.Library.Http.Packet
|
||||
{
|
||||
public class Request_InsertUniqueKey
|
||||
{
|
||||
public string Identity { get; set; }
|
||||
|
||||
public string? Data1 { get; set; }
|
||||
public string? Data2 { get; set; }
|
||||
public string? Data3 { get; set; }
|
||||
public string? Data4 { get; set; }
|
||||
public string? Data5 { get; set; }
|
||||
}
|
||||
|
||||
public class Response_InsertUniqueKy
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,6 @@
|
||||
using HubX.Library.Socket.Object;
|
||||
using DB.HubXDB;
|
||||
using HubX.Library.Http.Packet;
|
||||
using HubX.Library.Socket.Object;
|
||||
using HubX.Library.Socket.Session;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -37,7 +39,16 @@ namespace HubX.Library.Socket.Packet
|
||||
//insert DB
|
||||
if(jsonObject != null)
|
||||
{
|
||||
|
||||
Request_InsertUniqueKey request = new Request_InsertUniqueKey();
|
||||
request.Identity = jsonObject.Identity;
|
||||
request.Data1 = jsonObject.Data1;
|
||||
request.Data2 = jsonObject.Data2;
|
||||
request.Data3 = jsonObject.Data3;
|
||||
request.Data4 = jsonObject.Data4;
|
||||
request.Data5 = jsonObject.Data5;
|
||||
|
||||
SystemX.Core.Communication.Http http = new ();
|
||||
var res = http.PostJsonAsync<Request_InsertUniqueKey,Response_InsertUniqueKy>("https://127.0.0.1:9000/UniqueKey/InsertUniqueKey", request);
|
||||
}
|
||||
|
||||
ClientSession clientSession = session as ClientSession;
|
||||
|
||||
Reference in New Issue
Block a user