mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
-
This commit is contained in:
parent
d7041a8b36
commit
c6aee09d60
@ -11,6 +11,9 @@ namespace OrmTest
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("#### Updateable Start ####");
|
||||
|
||||
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
|
||||
{
|
||||
DbType = DbType.SqlServer,
|
||||
@ -96,6 +99,8 @@ namespace OrmTest
|
||||
|
||||
//Where Sql
|
||||
db.Updateable(updateObj).Where("id=@x", new { x = "1" }).ExecuteCommand();
|
||||
|
||||
Console.WriteLine("#### Updateable End ####");
|
||||
}
|
||||
|
||||
}
|
||||
|
15
Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs
Normal file
15
Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public class Demo3_Insertable
|
||||
{
|
||||
public static void Init() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -52,6 +52,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Demo\Demo2_Updateable.cs" />
|
||||
<Compile Include="Demo\Demo3_Insertable.cs" />
|
||||
<Compile Include="Demo\DemoC_GobalFilter.cs" />
|
||||
<Compile Include="Demo\Demo1_Queryable.cs" />
|
||||
<Compile Include="Demo\DemoD_DbFirst.cs" />
|
||||
|
@ -1845,6 +1845,7 @@ namespace SqlSugar
|
||||
{
|
||||
var contextProperty = item.GetType().GetProperty("Context");
|
||||
SqlSugarProvider newClient = this.Context.Utilities.CopyContext();
|
||||
newClient.Ado.IsDisableMasterSlaveSeparation = true;
|
||||
if (newClient.CurrentConnectionConfig.AopEvents == null)
|
||||
newClient.CurrentConnectionConfig.AopEvents = new AopEvents();
|
||||
contextProperty.SetValue(item, newClient, null);
|
||||
|
Loading…
Reference in New Issue
Block a user