Ejemplo n.º 1
0
        public void TestUpdateWithStaticObjectWithAdditionalProperty()
        {
            var user = new RogueUser
            {
                Id            = 1,
                Name          = "Steve",
                Age           = 50,
                RogueProperty = 42
            };

            _db.Users.Update(user);
            GeneratedSqlIs(
                "update [dbo].[Users] set [Name] = @p1, [Password] = @p2, [Age] = @p3 where [dbo].[Users].[Id] = @p4");
            Parameter(0).Is("Steve");
            Parameter(1).IsDBNull();
            Parameter(2).Is(50);
            Parameter(3).Is(1);
        }
Ejemplo n.º 2
0
 public void TestUpdateWithStaticObjectWithAdditionalProperty()
 {
     var user = new RogueUser
     {
         Id = 1,
         Name = "Steve",
         Age = 50,
         RogueProperty = 42
     };
     _db.Users.Update(user);
     GeneratedSqlIs(
         "update [dbo].[Users] set [Name] = @p1, [Password] = @p2, [Age] = @p3 where [dbo].[Users].[Id] = @p4");
     Parameter(0).Is("Steve");
     Parameter(1).IsDBNull();
     Parameter(2).Is(50);
     Parameter(3).Is(1);
 }