Пример #1
0
 public Dictionary <string, string> UpdateFirstName_IncludingAtBothLevelBinds(
     [Bind("FirstName")] User2 param1)
 {
     return(new Dictionary <string, string>()
     {
         // The since FirstName is included at both level it is bound.
         { "param1.FirstName", param1.FirstName },
     });
 }
Пример #2
0
        public Dictionary <string, string> UpdateIsAdmin_IncludingAtOnlyOneLevelDoesNotBind(
            [Bind("IsAdmin")] User2 param1)
        {
            return(new Dictionary <string, string>()
            {
                // IsAdmin is not included because it is not explicitly included at type level.
                { "param1.IsAdmin", param1.IsAdmin.ToString() },

                // FirstName is not included because it is not explicitly included at parameter level.
                { "param1.FirstName", param1.FirstName },
            });
        }
Пример #3
0
        UpdateUserId_BlackListingAtEitherLevelDoesNotBind(
            [Bind(typeof(ExcludeLastName))] User2 param1,
            [Bind("Id")] User2 param2)
        {
            return(new Dictionary <string, string>()
            {
                // LastName is excluded at parameter level.
                { "param1.LastName", param1.LastName },

                // Id is excluded because it is not explicitly included by the bind attribute at type level.
                { "param2.Id", param2.Id.ToString() },
            });
        }