FruityFoundation/FruityFoundation.DataAccess.Sqlite/SqliteConnectionExtensions.cs
2024-06-23 18:15:32 -04:00

14 lines
370 B
C#

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);
}
}