2011-06-23 12:47:48 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq.Expressions;
|
2011-06-29 20:27:07 +00:00
|
|
|
|
using NHibernate;
|
2011-06-23 12:47:48 +00:00
|
|
|
|
|
|
|
|
|
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);
|
2011-06-29 20:27:07 +00:00
|
|
|
|
|
|
|
|
|
IQueryOver<T, T> Query();
|
2011-06-23 12:47:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|