SweetLib/SweetLib.Storage/Database/IConnectionProvider.cs

17 lines
518 B
C#
Raw Normal View History

2022-11-15 22:12:50 +01:00
using System.Data.Common;
namespace SweetLib.Storage.Database
{
/// <summary>
/// Provider for database connection.
/// </summary>
/// <typeparam name="T">Specific type of the database connection. Must inherit <see cref="DbConnection" />.</typeparam>
public interface IConnectionProvider<T> where T : DbConnection
{
/// <summary>
/// Gets an instance of a database connection.
/// </summary>
/// <returns></returns>
T GetConnection();
}
}