Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2eba8f7

Browse files
IRepositoryBase added
1 parent a7b2e7a commit 2eba8f7

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

‎src/AspnetRun.Core/AspnetRun.Core.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.2</TargetFramework>
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
42

53
namespace AspnetRun.Core.Exceptions
64
{
@@ -10,5 +8,10 @@ internal CoreException(string businessMessage)
108
: base(businessMessage)
119
{
1210
}
11+
12+
internal CoreException(string message, Exception innerException)
13+
: base(message, innerException)
14+
{
15+
}
1316
}
1417
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using AspnetRun.Core.Entities.Base;
2+
using AspnetRun.Core.Interfaces;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Linq.Expressions;
7+
using System.Threading.Tasks;
8+
9+
namespace AspnetRun.Core.Repositories.Base
10+
{
11+
public interface IRepositoryBase<T> where T : Entity
12+
{
13+
Task<IReadOnlyList<T>> GetAllAsync();
14+
Task<IReadOnlyList<T>> GetAsync(Expression<Func<T, bool>> predicate);
15+
Task<IReadOnlyList<T>> GetAsync(Expression<Func<T, bool>> predicate = null,
16+
Func<IQueryable<T>, IOrderedQueryable<T>> orderBy = null,
17+
string includeString = null,
18+
bool disableTracking = true);
19+
Task<IReadOnlyList<T>> GetAsync(Expression<Func<T, bool>> predicate = null,
20+
Func<IQueryable<T>, IOrderedQueryable<T>> orderBy = null,
21+
List<Expression<Func<T, object>>> includes = null,
22+
bool disableTracking = true);
23+
Task<IReadOnlyList<T>> GetAsync(ISpecification<T> spec);
24+
Task<T> GetByIdAsync(int id);
25+
Task<T> AddAsync(T entity);
26+
Task UpdateAsync(T entity);
27+
Task DeleteAsync(T entity);
28+
Task<int> CountAsync(ISpecification<T> spec);
29+
}
30+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /