started defining repository interfaces
This commit is contained in:
parent
1df30344b5
commit
468ddba909
1 changed files with 10 additions and 0 deletions
10
SurveyLib.Core/Repositories/IGenericRepository.cs
Normal file
10
SurveyLib.Core/Repositories/IGenericRepository.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
namespace SurveyLib.Core.Repositories;
|
||||||
|
|
||||||
|
public interface IGenericRepository<T> where T : class
|
||||||
|
{
|
||||||
|
Task<T>? GetByIdAsync(int id);
|
||||||
|
Task<IEnumerable<T>> GetAllAsync();
|
||||||
|
Task AddAsync(T entity);
|
||||||
|
Task UpdateAsync(T entity);
|
||||||
|
Task DeleteAsync(T entity);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue