18 lines
597 B
C#
18 lines
597 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq.Expressions;
|
|
|
|
namespace Taloyhtio.GeneralSSO.Server.CodeFiles.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);
|
|
}
|
|
}
|