vreksam/DAL/Interfaces/IRepository.cs

21 lines
515 B
C#

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace DAL.Interfaces
{
public interface IRepository<T> where T : class
{
T Add(T entity);
T Update(T entity);
void Delete(T entity);
void Delete(Expression<Func<T, bool>> where);
T GetById(int id);
T Get(Expression<Func<T, bool>> where);
IEnumerable<T> GetAll();
IEnumerable<T> GetMany(Expression<Func<T, bool>> where);
int SaveChanges();
}
}