You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
792 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using TaskManager.Entity;
using TaskManager.EntityFramework.Repository;
namespace TaskManager.EntityFramework
{
public interface IRepository<TEntity> where TEntity : BaseEntity
{
Task<TEntity> GetByIdAsync(int id);
Task<IEnumerable<TEntity>> GetAllAsync();
Task<TEntity> AddAsync(TEntity entity);
Task UpdateAsync(TEntity entity);
Task DeleteAsync(int id);
Task<PagedResult<TEntity>> GetPagedAsync(PagingParams pagingParams);
Task<PagedResult<TEntity>> GetPagedAsync(
Expression<Func<TEntity, bool>> filter = null,
PagingParams pagingParams = null);
}
}