aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio_v2/Tango.DAL/IRepository.cs
blob: a6d6989dd59bf21f0e6c74e292be3d20be48b0a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Tango.DAL
{
    public interface IRepository : IDisposable
    {

    }

    public interface IRepository<T> : IRepository where T : Entity
    {
        Task<List<T>> GetAsync(Expression<Func<T, bool>> filter);
        Task<List<T>> GetAllAsync();
        Task<T> ReplaceAsync(T entity);
        Task<long> DeleteAsync(Expression<Func<T, bool>> filter);
        Task<T> Insert(T entity);
        Task<long> Count();
        Task<long> Count(Expression<Func<T, bool>> filter);
    }
}