-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAbstractRepository.cs
More file actions
33 lines (30 loc) · 1.1 KB
/
AbstractRepository.cs
File metadata and controls
33 lines (30 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.Data;
using System.Threading;
using System.Threading.Tasks;
namespace Tao.Repository
{
public abstract class AbstractRepository : RepositoryBase
{
public abstract List<T> Get<T>(
string dbConnString,
string sql,
IList<IDataParameter> dataParameters = null,
int commandTimeout = 10000,
CommandBehavior commandBehavior = CommandBehavior.CloseConnection);
public abstract IEnumerable<T> Get<T>(
string dbConnString,
string sql,
Func<IDataRecord, T> projector,
IList<IDataParameter> dataParameters = null,
int commandTimeout = 10000,
CommandBehavior commandBehavior = CommandBehavior.CloseConnection);
public abstract Task<IEnumerable<T>> GetAsync<T>(
string dbConnString,
string sql,
CancellationToken cancellationToken,
IList<IDataParameter> dataParameters = null,
CommandBehavior commandBehavior = CommandBehavior.CloseConnection);
}
}