Files
server/src/Core/Repositories/BaseRepository.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
939 B
C#
Raw Normal View History

using System;
using Dapper;
2019-01-15 21:55:42 -05:00
namespace Bit.Core.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; }
}
}