using System;
using System.Collections.Generic;
using System.ServiceModel;
using CB.Entity;
namespace CB.Interface
{
///
/// 基础数据操作接口
///
///
public interface IRepository where TEntity : BaseEntity, new()
{
///
/// 数据新增操作
///
///
///
[OperationContract]
bool Save(TEntity entity);
///
/// 数据更新操作
///
///
///
[OperationContract]
bool Update(TEntity entity);
///
/// 数据删除操作
///
///
///
bool Delete(int Id);
///
/// 数据获取
///
///
///
///
///
TEntity Get(TKey key);
///
/// 数据列表
///
///
///
IList ToList();
///
/// 数据查询
///
///
///
///
IList ToList(TEntity entity);
///
/// 翻页查询数据列表
///
///
///
///
///
///
IList ToPaging(TEntity entity, int pageSize, int pageIndex, out int recordCount);
}
}