aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Interfaces/Repositories/IRepository.cs
blob: d9f7c7a122994f80d8e6bbdadaff3ad6b5dd57af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using System.Threading.Tasks;

namespace DevHive.Data.Repositories.Interfaces
{
	public interface IRepository<TEntity>
		where TEntity : class
	{
		//Add Entity to database
		Task<bool> AddAsync(TEntity entity);

		//Find entity by id
		Task<TEntity> GetByIdAsync(Guid id);

		//Modify Entity from database
		Task<bool> EditAsync(TEntity newEntity);

		//Delete Entity from database
		Task<bool> DeleteAsync(TEntity entity);
	}
}