mirror of
https://github.com/bitwarden/server.git
synced 2026-02-01 22:53:12 +08:00
* Revert "Add git blame entry (#2226)" This reverts commit239286737d. * Revert "Turn on file scoped namespaces (#2225)" This reverts commit34fb4cca2a.
31 lines
942 B
C#
31 lines
942 B
C#
using Dapper;
|
|
|
|
namespace Bit.Infrastructure.Dapper.Repositories
|
|
{
|
|
public abstract class BaseRepository
|
|
{
|
|
static BaseRepository()
|
|
{
|
|
SqlMapper.AddTypeHandler(new DateTimeHandler());
|
|
}
|
|
|
|
public BaseRepository(string connectionString, string readOnlyConnectionString)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(connectionString))
|
|
{
|
|
throw new ArgumentNullException(nameof(connectionString));
|
|
}
|
|
if (string.IsNullOrWhiteSpace(readOnlyConnectionString))
|
|
{
|
|
throw new ArgumentNullException(nameof(readOnlyConnectionString));
|
|
}
|
|
|
|
ConnectionString = connectionString;
|
|
ReadOnlyConnectionString = readOnlyConnectionString;
|
|
}
|
|
|
|
protected string ConnectionString { get; private set; }
|
|
protected string ReadOnlyConnectionString { get; private set; }
|
|
}
|
|
}
|