18 lines
540 B
C#
18 lines
540 B
C#
// Repositories/IGenericRepository.cs
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq.Expressions;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BelegeingangDatabase.Repositories
|
|
{
|
|
public interface IGenericRepository<T> where T : class
|
|
{
|
|
Task<IEnumerable<T>> GetAllAsync();
|
|
Task<IEnumerable<T>> FindAsync(Expression<Func<T, bool>> predicate);
|
|
Task<T> GetByIdAsync(int id);
|
|
Task AddAsync(T entity);
|
|
void Update(T entity);
|
|
void Remove(T entity);
|
|
}
|
|
} |