aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Repositories/IRepository.cs
blob: f12ad3eaa945c234fff39128ea1a6b8605454e01 (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 Data.Models.Interfaces.Database
{
	public interface IRepository<TEntity>
		where TEntity : class
	{
		//Add Entity to database
		Task AddAsync(TEntity entity);

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

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

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