public EntityQueryBuilder(ISession session) { Guard.ArgumentNotNull(session, nameof(session)); // ReSharper disable once UsePatternMatching var sqlException = session as Session; if (sqlException != null) { var sqlGeneratorImpl = new SqlGeneratorImpl(sqlException.Configuration); _dapperImplementation = new DapperImplementor(sqlGeneratorImpl); } else { throw new InvalidOperationException("ISession is not a Session type."); } _dapperSession = new DapperSession(sqlException.GetConnection()); }
public BaseRepository() { _dbSession = DapperSession.DbSession; }