mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Update SimoleClient<T>
This commit is contained in:
@@ -131,6 +131,39 @@ namespace SqlSugar
|
|||||||
this.Context = context;
|
this.Context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ISugarQueryable<T> AsQueryable()
|
||||||
|
{
|
||||||
|
return Context.Queryable<T>();
|
||||||
|
}
|
||||||
|
public IInsertable<T> AsInsertable(T insertObj)
|
||||||
|
{
|
||||||
|
return Context.Insertable<T>(insertObj);
|
||||||
|
}
|
||||||
|
public IInsertable<T> AsInsertable(T[] insertObjs)
|
||||||
|
{
|
||||||
|
return Context.Insertable<T>(insertObjs);
|
||||||
|
}
|
||||||
|
public IInsertable<T> AsInsertable(List<T> insertObjs)
|
||||||
|
{
|
||||||
|
return Context.Insertable<T>(insertObjs);
|
||||||
|
}
|
||||||
|
public IUpdateable<T> AsUpdateable(T updateObj)
|
||||||
|
{
|
||||||
|
return Context.Updateable<T>(updateObj);
|
||||||
|
}
|
||||||
|
public IUpdateable<T> AsUpdateable(T[] updateObjs)
|
||||||
|
{
|
||||||
|
return Context.Updateable<T>(updateObjs);
|
||||||
|
}
|
||||||
|
public IUpdateable<T> AsUpdateable(List<T> updateObjs)
|
||||||
|
{
|
||||||
|
return Context.Updateable<T>(updateObjs);
|
||||||
|
}
|
||||||
|
public IDeleteable<T> AsDeleteable()
|
||||||
|
{
|
||||||
|
return Context.Deleteable<T>();
|
||||||
|
}
|
||||||
|
|
||||||
public T GetById(dynamic id)
|
public T GetById(dynamic id)
|
||||||
{
|
{
|
||||||
return Context.Queryable<T>().InSingle(id);
|
return Context.Queryable<T>().InSingle(id);
|
||||||
@@ -205,7 +238,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return this.Context.Updateable(updateObj).ExecuteCommand() > 0;
|
return this.Context.Updateable(updateObj).ExecuteCommand() > 0;
|
||||||
}
|
}
|
||||||
public bool UpdateRange(T [] updateObjs)
|
public bool UpdateRange(T[] updateObjs)
|
||||||
{
|
{
|
||||||
return this.Context.Updateable(updateObjs).ExecuteCommand() > 0;
|
return this.Context.Updateable(updateObjs).ExecuteCommand() > 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user