- infocenter.zip
- InfoCenter
- ConfigSamples
- InfoCenter.Agent
- InfoCenter.Logic.Tests
- InfoCenter.Logic
- Agent
- Entities
- Helpers
- bin
- Debug
- Antlr3.Runtime.dll
- hibernate.cfg.xml
- Iesi.Collections.dll
- InfoCenter.Logic.dll
- InfoCenter.Logic.dll.mdb
- InfoCenter.Logic.pdb
- InfoCenter.Persistence.dll
- InfoCenter.Persistence.dll.mdb
- InfoCenter.Persistence.pdb
- log4net.dll
- Release
- InfoCenter.Logic.csproj
- InfoCenter.Logic.pidb
- obj
- Debug
- PacketParser.cs
- Properties
- InfoCenter.Persistence.Test
- InfoCenter.Persistence
- InfoCenter.sln
- InfoCenter.userprefs
- InfoCenter.WebConsole
- SharedLibs
- Antlr3.Runtime.dll
- Castle.Core.dll
- Castle.DynamicProxy2.dll
- Iesi.Collections.dll
- log4net.dll
- MySql.Data.dll
- NHibernate.ByteCode.Castle.dll
- NHibernate.dll
- nunit.framework.dll
- test-results
|
using System;
using System.Collections.Generic;
using System.Text;
using NHibernate.Criterion;
namespace InfoCenter.Persistence.Core
{
public interface IRepository<T>
{
void Add(T entity);
void Update(T entity);
void Remove(T entity);
void Remove(DetachedCriteria criteria);
//void Remove(Expression<Func<T, bool>> predicate);
long Count(DetachedCriteria criteria);
//long Count(Expression<Func<T, bool>> predicate);
bool Exists(DetachedCriteria criteria);
// bool Exists(Expression<Func<T, bool>> predicate);
//IQueryable<T> FindAll(Expression<Func<T, bool>> predicate);
//IQueryable<T> FindAll(Expression<Func<T, bool>> predicate, int pageIndex, int pageSize);
//Collection by criteria
ICollection<T> FindAll(DetachedCriteria criteria);
ICollection<T> FindAll(DetachedCriteria criteria, params Order[] orders);
ICollection<T> FindAll(DetachedCriteria criteria, int firstResult, int numberOfResults, params Order[] orders);
//Single by criteria
T FindFirst(DetachedCriteria criteria, Order order);
T FindFirst(DetachedCriteria criteria);
T FindOne(DetachedCriteria criteria);
//T FindOne(Expression<Func<T, bool>> predicate);
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Interested in design/development of framework functionality using the best patterns and practices.