| 1234567891011121314151617181920212223242526272829303132333435363738 |
- // ======================================
- // Author: Ebenezer Monney
- // Email: info@ebenmonney.com
- // Copyright (c) 2017 www.ebenmonney.com
- //
- // ==> Gun4Hire: contact@ebenmonney.com
- // ======================================
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using System.Threading.Tasks;
- namespace DAL.Repositories.Interfaces
- {
- public interface IRepository<TEntity> where TEntity : class
- {
- void Add(TEntity entity);
- void AddRange(IEnumerable<TEntity> entities);
- void Update(TEntity entity);
- void UpdateRange(IEnumerable<TEntity> entities);
- void Remove(TEntity entity);
- void RemoveRange(IEnumerable<TEntity> entities);
- int Count();
- IEnumerable<TEntity> Find(Expression<Func<TEntity, bool>> predicate);
- TEntity GetSingleOrDefault(Expression<Func<TEntity, bool>> predicate);
- TEntity Get(int id);
- IEnumerable<TEntity> GetAll();
- }
- }
|