mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update SimpleClient
This commit is contained in:
parent
e07d973490
commit
c1049eb3ff
42
Src/Asp.Net/SqlSugar/Interface/ISimpleClient.cs
Normal file
42
Src/Asp.Net/SqlSugar/Interface/ISimpleClient.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
public interface ISimpleClient<T> where T : class, new()
|
||||
{
|
||||
IDeleteable<T> AsDeleteable();
|
||||
IInsertable<T> AsInsertable(List<T> insertObjs);
|
||||
IInsertable<T> AsInsertable(T insertObj);
|
||||
IInsertable<T> AsInsertable(T[] insertObjs);
|
||||
ISugarQueryable<T> AsQueryable();
|
||||
ISqlSugarClient AsSugarClient();
|
||||
ITenant AsTenant();
|
||||
IUpdateable<T> AsUpdateable(List<T> updateObjs);
|
||||
IUpdateable<T> AsUpdateable(T updateObj);
|
||||
IUpdateable<T> AsUpdateable(T[] updateObjs);
|
||||
int Count(Expression<Func<T, bool>> whereExpression);
|
||||
bool Delete(Expression<Func<T, bool>> whereExpression);
|
||||
bool Delete(T deleteObj);
|
||||
bool DeleteById(dynamic id);
|
||||
bool DeleteByIds(dynamic[] ids);
|
||||
T GetById(dynamic id);
|
||||
List<T> GetList();
|
||||
List<T> GetList(Expression<Func<T, bool>> whereExpression);
|
||||
List<T> GetPageList(Expression<Func<T, bool>> whereExpression, PageModel page);
|
||||
List<T> GetPageList(Expression<Func<T, bool>> whereExpression, PageModel page, Expression<Func<T, object>> orderByExpression = null, OrderByType orderByType = OrderByType.Asc);
|
||||
List<T> GetPageList(List<IConditionalModel> conditionalList, PageModel page);
|
||||
List<T> GetPageList(List<IConditionalModel> conditionalList, PageModel page, Expression<Func<T, object>> orderByExpression = null, OrderByType orderByType = OrderByType.Asc);
|
||||
T GetSingle(Expression<Func<T, bool>> whereExpression);
|
||||
bool Insert(T insertObj);
|
||||
bool InsertRange(List<T> insertObjs);
|
||||
bool InsertRange(T[] insertObjs);
|
||||
int InsertReturnIdentity(T insertObj);
|
||||
bool IsAny(Expression<Func<T, bool>> whereExpression);
|
||||
bool Update(Expression<Func<T, T>> columns, Expression<Func<T, bool>> whereExpression);
|
||||
bool Update(T updateObj);
|
||||
bool UpdateRange(List<T> updateObjs);
|
||||
bool UpdateRange(T[] updateObjs);
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ using System.Text;
|
||||
namespace SqlSugar
|
||||
{
|
||||
|
||||
public partial class SimpleClient<T> where T : class, new()
|
||||
public partial class SimpleClient<T> : ISimpleClient<T> where T : class, new()
|
||||
{
|
||||
protected ISqlSugarClient Context { get; set; }
|
||||
|
||||
@ -171,6 +171,7 @@ namespace SqlSugar
|
||||
}
|
||||
|
||||
|
||||
[Obsolete("Use SimpleClient<T>")]
|
||||
public partial class SimpleClient
|
||||
{
|
||||
protected ISqlSugarClient Context { get; set; }
|
||||
|
@ -134,6 +134,7 @@
|
||||
<Compile Include="Interface\ISaveable.cs" />
|
||||
<Compile Include="Interface\ISqlSugarClient.cs" />
|
||||
<Compile Include="Interface\ITenant.cs" />
|
||||
<Compile Include="Interface\ISimpleClient.cs" />
|
||||
<Compile Include="Realization\Oracle\Deleteable\OracleDeleteable.cs" />
|
||||
<Compile Include="Realization\Oracle\Insertable\OracleInsertable.cs" />
|
||||
<Compile Include="Realization\Oracle\Updateable\OracleUpdateable.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user