22 lines
587 B
C#
22 lines
587 B
C#
|
using System.Data;
|
||
|
|
||
|
namespace Galaeth.Core.Infrastructure;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Scoped database connection provider.
|
||
|
/// </summary>
|
||
|
public interface IDbConnectionProvider : IDisposable
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Open new database connection for this scope.
|
||
|
/// </summary>
|
||
|
/// <returns>Instance of <see cref="IDbConnection"/>.</returns>
|
||
|
IDbConnection OpenConnection();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Open new database connection for this scope.
|
||
|
/// </summary>
|
||
|
/// <returns>Instance of <see cref="IDbConnection"/>.</returns>
|
||
|
Task<IDbConnection> OpenConnectionAsync();
|
||
|
}
|