20 lines
613 B
C#
20 lines
613 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq.Expressions;
|
|
using System.Text;
|
|
|
|
namespace GeneralApi.Core.Repositories
|
|
{
|
|
public interface IRepository<TEntity, TKey>
|
|
{
|
|
TEntity GetById(TKey id);
|
|
void Save(TEntity entity);
|
|
IEnumerable<TEntity> GetAll();
|
|
IEnumerable<TEntity> GetAllOrderBy<TProperty>(Expression<Func<TEntity, TProperty>> selector);
|
|
IEnumerable<TEntity> GetAllOrderBy<TProperty>(Expression<Func<TEntity, TProperty>> selector, bool asc);
|
|
void Delete(TEntity entity);
|
|
bool Exist(TKey key);
|
|
}
|
|
}
|