forked from SharpRepository/SharpRepository
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompositeRepository.cs
More file actions
47 lines (38 loc) · 1.15 KB
/
CompositeRepository.cs
File metadata and controls
47 lines (38 loc) · 1.15 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Linq;
using SharpRepository.Repository.FetchStrategies;
namespace SharpRepository.Repository
{
// right now int is hard coded but it's sloppy and need to fix this inheritance
public class CompositeRepository<T> : LinqRepositoryBase<T, int> where T : class
{
private readonly IQueryable<T> _baseQuery;
public CompositeRepository(IQueryable<T> baseQuery)
{
_baseQuery = baseQuery;
}
protected override IQueryable<T> BaseQuery(IFetchStrategy<T> fetchStrategy = null)
{
return _baseQuery;
}
protected override void AddItem(T entity)
{
throw new NotImplementedException();
}
protected override void DeleteItem(T entity)
{
throw new NotImplementedException();
}
protected override void UpdateItem(T entity)
{
throw new NotImplementedException();
}
protected override void SaveChanges()
{
throw new NotImplementedException();
}
public override void Dispose()
{
}
}
}