FruityFoundation/FruityFoundation.DataAccess.Sqlite/SqliteConnectionExtensions.cs

14 lines
370 B
C#
Raw Normal View History

2024-06-23 18:15:32 -04:00
using System.Data;
using Microsoft.Data.Sqlite;
namespace FruityFoundation.DataAccess.Sqlite;
public static class SqliteConnectionExtensions
{
public static async Task<SqliteTransaction> CreateTransaction(this SqliteConnection connection, IsolationLevel isolationLevel)
{
await connection.OpenAsync();
return connection.BeginTransaction(isolationLevel);
}
}