59909a5ee7
Must use the Repositories with Using or else bad things will happen.
25 lines
595 B
C#
25 lines
595 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq.Expressions;
|
|
using NHibernate;
|
|
|
|
namespace Tanshu.Accounts.Repository
|
|
{
|
|
public interface IRepository<T>
|
|
{
|
|
void Insert(T item);
|
|
void Update(T item);
|
|
void Delete(T item);
|
|
void Delete(Expression<Func<T, bool>> query);
|
|
void DeleteList(Expression<Func<T, bool>> query);
|
|
void DeleteList(IList<T> list);
|
|
|
|
T Get(Expression<Func<T, bool>> query);
|
|
|
|
IList<T> List();
|
|
IList<T> List(Expression<Func<T, bool>> query);
|
|
|
|
IQueryOver<T, T> Query();
|
|
}
|
|
}
|