mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
采用全新的数据库架构
This commit is contained in:
40
OpenAuth.Domain/Interface/IRepository.cs
Normal file
40
OpenAuth.Domain/Interface/IRepository.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : OpenAuth.Domain
|
||||
// Author : yubaolee
|
||||
// Created : 10-25-2015
|
||||
//
|
||||
// Last Modified By : yubaolee
|
||||
// Last Modified On : 10-25-2015
|
||||
// ***********************************************************************
|
||||
// <copyright file="IRepository.cs" company="www.cnblogs.com/yubaolee">
|
||||
// Copyright (c) www.cnblogs.com/yubaolee. All rights reserved.
|
||||
// </copyright>
|
||||
// <summary>仓储接口</summary>
|
||||
// ***********************************************************************
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
public interface IRepository<T> where T : class
|
||||
{
|
||||
T FindSingle(Expression<Func<T, bool>> exp = null);
|
||||
|
||||
IQueryable<T> Find(Expression<Func<T, bool>> exp = null);
|
||||
|
||||
IQueryable<T> Find(int pageindex = 1, int pagesize = 10, string orderby = "",
|
||||
Expression<Func<T, bool>> exp = null);
|
||||
|
||||
int GetCount(Expression<Func<T, bool>> exp = null);
|
||||
|
||||
void Add(T entity);
|
||||
|
||||
void Update(T entity);
|
||||
|
||||
void Delete(T entity);
|
||||
|
||||
void Save();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user