blob: 81a1a3559ed89c57ee2fd393c905828257a59a96 (
plain) (
blame)
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.Collections.Generic;
using System.Threading.Tasks;
namespace Data.Models.Interfaces.Database
{
public interface IRepository<TEntity>
where TEntity : class
{
//Add Entity to database
Task AddAsync(TEntity entity);
//Return *count* instances of Entity from the database
IEnumerable<TEntity> Query(int count);
//Find entity by id
Task<TEntity> FindByIdAsync(object id);
//Modify Entity from database
Task EditAsync(object id, TEntity newEntity);
//Delete Entity from database
Task DeleteAsync(object id);
}
}
|