diff --git a/Src/Asp.Net/MySqlTest/MySqlTest.csproj b/Src/Asp.Net/MySqlTest/MySqlTest.csproj index b14daa0ae..1b078fec9 100644 --- a/Src/Asp.Net/MySqlTest/MySqlTest.csproj +++ b/Src/Asp.Net/MySqlTest/MySqlTest.csproj @@ -86,6 +86,7 @@ + diff --git a/Src/Asp.Net/MySqlTest/UnitTest/Main.cs b/Src/Asp.Net/MySqlTest/UnitTest/Main.cs index 237a114f0..02177f330 100644 --- a/Src/Asp.Net/MySqlTest/UnitTest/Main.cs +++ b/Src/Asp.Net/MySqlTest/UnitTest/Main.cs @@ -31,6 +31,7 @@ namespace OrmTest } public static void Init() { + UDelete.Init(); UCustom012.Init(); UCustom014.Init(); UCustom015.Init(); diff --git a/Src/Asp.Net/MySqlTest/UnitTest/UDelete.cs b/Src/Asp.Net/MySqlTest/UnitTest/UDelete.cs new file mode 100644 index 000000000..46cee2b0d --- /dev/null +++ b/Src/Asp.Net/MySqlTest/UnitTest/UDelete.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SqlSugar; +namespace OrmTest +{ + public class UDelete + { + + public static void Init() + { + var db = NewUnitTest.Db; + db.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings() + { + DisableNvarchar = true + }; + db.CodeFirst.InitTables(); + db.Deleteable(new List() { + new PlayerWeaponSkinEntity(){ + PlayerId=1, + Seed=1 + }, + new PlayerWeaponSkinEntity(){ + PlayerId=1, + Seed=1 + } + }).ExecuteCommand(); + } + + [SugarTable("kcf_player_weaponskin")] + public class PlayerWeaponSkinEntity + { + /// + /// 玩家PlayerID + /// + [SugarColumn(ColumnName = "pid", IsPrimaryKey = true)] + public uint PlayerId { get; set; } + + [SugarColumn(ColumnName = "weapon", IsPrimaryKey = true)] + public string WeaponClass { get; set; } = "__weapon_class__"; + + public ushort Skin { get; set; } + public ushort Seed { get; set; } + public decimal Wear { get; set; } // don't use float + } + } +}