30 lines
806 B
C#
30 lines
806 B
C#
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);
|
|
//}
|
|
}
|
|
}
|
|
}
|