mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-30 04:45:54 +08:00
-
This commit is contained in:
parent
4c732f25dc
commit
be99b5f9c2
@ -1,4 +1,5 @@
|
||||
using OrmTest.UnitTest;
|
||||
using OrmTest.Models;
|
||||
using OrmTest.UnitTest;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -18,7 +19,17 @@ namespace OrmTest
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
var db = GetInstance();
|
||||
//by entity
|
||||
var s1= db.Deleteable<Student>().Where(new Student() { Id = 1 }).ToSql();
|
||||
//use lock
|
||||
var s2 = db.Deleteable<Student>().With(SqlWith.RowLock).ToSql();
|
||||
//by primary key
|
||||
var s3 = db.Deleteable<Student>().Where(1).ToSql();
|
||||
//by primary key array
|
||||
var s4 = db.Deleteable<Student>().Where(new int[] { 1,2}).ToSql();
|
||||
//by expression
|
||||
var s5 = db.Deleteable<Student>().Where(it=>it.Id==1).ToSql();
|
||||
}
|
||||
|
||||
public SqlSugarClient GetInstance()
|
||||
|
@ -19,11 +19,6 @@ namespace SqlSugar
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IDeleteable<T> TableName(string name)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IDeleteable<T> Where(List<T> deleteObjs)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@ -58,5 +53,10 @@ namespace SqlSugar
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public KeyValuePair<string, List<SugarParameter>> ToSql()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ namespace SqlSugar
|
||||
public interface IDeleteable<T>
|
||||
{
|
||||
int ExecuteCommand();
|
||||
IDeleteable<T> TableName(string name);
|
||||
IDeleteable<T> With(string lockString);
|
||||
IDeleteable<T> Where(T deleteObj);
|
||||
IDeleteable<T> Where(Expression<Func<T, bool>> expression);
|
||||
@ -18,5 +17,6 @@ namespace SqlSugar
|
||||
IDeleteable<T> Where<PkType>(PkType primaryKeyValue);
|
||||
IDeleteable<T> Where<PkType>(PkType [] primaryKeyValues);
|
||||
IDeleteable<T> Where(string whereString,object whereObj);
|
||||
KeyValuePair<string, List<SugarParameter>> ToSql();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user