All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 34s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
30 lines
587 B
C#
30 lines
587 B
C#
using FreeSql;
|
|
|
|
namespace WebApi.Test.Repository;
|
|
|
|
public abstract class RepositoryTestBase : BaseTest, IDisposable
|
|
{
|
|
protected IFreeSql FreeSql { get; }
|
|
|
|
protected RepositoryTestBase()
|
|
{
|
|
FreeSql = new FreeSqlBuilder()
|
|
.UseConnectionString(DataType.Sqlite, "Data Source=:memory:")
|
|
.UseAutoSyncStructure(true)
|
|
.UseNoneCommandParameter(true)
|
|
.Build();
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
try
|
|
{
|
|
FreeSql.Dispose();
|
|
}
|
|
catch
|
|
{
|
|
// ignore
|
|
}
|
|
}
|
|
}
|