コード例 #1
0
ファイル: CommonTest.cs プロジェクト: leohsu91/DbEntry
        public void TestUpdateBy4()
        {
            DbEntry.UpdateBy <TestClass>(CK.K["Name"] == "abc", new { Age = 3L, Gender = true });
            AssertSql(@"UPDATE [Test_Class] SET [Age]=@Age_0,[Gender]=@Gender_1  WHERE [Name] = @Name_2;
<Text><30>(@Age_0=3:Int64,@Gender_1=True:Boolean,@Name_2=abc:String)");
        }
コード例 #2
0
ファイル: CommonTest.cs プロジェクト: leohsu91/DbEntry
        public void TestUpdateBy2()
        {
            DbEntry.UpdateBy <TestClass>(p => p.Name == "abc", new { Age = 3L });
            AssertSql(@"UPDATE [Test_Class] SET [Age]=@Age_0  WHERE [Name] = @Name_1;
<Text><30>(@Age_0=3:Int64,@Name_1=abc:String)");
        }