当前位置: 首页>>代码示例>>C#>>正文


C# DbParameterValues.GetParameterName方法代码示例

本文整理汇总了C#中DbParameterValues.GetParameterName方法的典型用法代码示例。如果您正苦于以下问题:C# DbParameterValues.GetParameterName方法的具体用法?C# DbParameterValues.GetParameterName怎么用?C# DbParameterValues.GetParameterName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DbParameterValues的用法示例。


在下文中一共展示了DbParameterValues.GetParameterName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IWorldStatsCountUserKillNpcTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "count":
                        paramValues[i] = source.Count;
                        break;

                    case "last_update":
                        paramValues[i] = source.LastUpdate;
                        break;

                    case "npc_template_id":
                        paramValues[i] = (UInt16)source.NPCTemplateID;
                        break;

                    case "user_id":
                        paramValues[i] = (Int32)source.UserID;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:34,代码来源:WorldStatsCountUserKillNpcTableDbExtensions.cs

示例2: TryCopyValues

 /// <summary>
 /// Copies the column values into the given DbParameterValues using the database column name
 /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
 /// for the value to be copied over. If any of the keys in the DbParameterValues do not
 /// match one of the column names, or if there is no field for a key, then it will be
 /// ignored. Because of this, it is important to be careful when using this method
 /// since columns or keys can be skipped without any indication.
 /// </summary>
 /// <param name="source">The object to copy the values from.</param>
 /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
 public static void TryCopyValues(this IServerTimeTable source, DbParameterValues paramValues)
 {
     for (var i = 0; i < paramValues.Count; i++)
     {
         switch (paramValues.GetParameterName(i))
         {
             case "server_time":
                 paramValues[i] = source.ServerTime;
                 break;
         }
     }
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:22,代码来源:ServerTimeTableDbExtensions.cs

示例3: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IEventCountersQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "counter":
                        paramValues[i] = source.Counter;
                        break;

                    case "quest_event_counter_id":
                        paramValues[i] = source.QuestEventCounterId;
                        break;

                    case "quest_id":
                        paramValues[i] = (UInt16)source.QuestID;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:30,代码来源:EventCountersQuestTableDbExtensions.cs

示例4: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IQuestRequireFinishItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "amount":
                        paramValues[i] = source.Amount;
                        break;

                    case "item_template_id":
                        paramValues[i] = (UInt16)source.ItemTemplateID;
                        break;

                    case "quest_id":
                        paramValues[i] = (UInt16)source.QuestID;
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:30,代码来源:QuestRequireFinishItemTableDbExtensions.cs

示例5: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IShopItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "item_template_id":
                        paramValues[i] = (UInt16)source.ItemTemplateID;
                        break;

                    case "shop_id":
                        paramValues[i] = (UInt16)source.ShopID;
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:26,代码来源:ShopItemTableDbExtensions.cs

示例6: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IWorldStatsUserShoppingTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "amount":
                        paramValues[i] = source.Amount;
                        break;

                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "cost":
                        paramValues[i] = source.Cost;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "item_template_id":
                        paramValues[i] = (ushort?)source.ItemTemplateID;
                        break;

                    case "map_id":
                        paramValues[i] = (ushort?)source.MapID;
                        break;

                    case "sale_type":
                        paramValues[i] = source.SaleType;
                        break;

                    case "shop_id":
                        paramValues[i] = (UInt16)source.ShopID;
                        break;

                    case "when":
                        paramValues[i] = source.When;
                        break;

                    case "x":
                        paramValues[i] = source.X;
                        break;

                    case "y":
                        paramValues[i] = source.Y;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:62,代码来源:WorldStatsUserShoppingTableDbExtensions.cs

示例7: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IAllianceAttackableTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "alliance_id":
                        paramValues[i] = (Byte)source.AllianceID;
                        break;

                    case "attackable_id":
                        paramValues[i] = (Byte)source.AttackableID;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:26,代码来源:AllianceAttackableTableDbExtensions.cs

示例8: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IWorldStatsQuestCancelTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "map_id":
                        paramValues[i] = (ushort?)source.MapID;
                        break;

                    case "quest_id":
                        paramValues[i] = (UInt16)source.QuestID;
                        break;

                    case "user_id":
                        paramValues[i] = (Int32)source.UserID;
                        break;

                    case "when":
                        paramValues[i] = source.When;
                        break;

                    case "x":
                        paramValues[i] = source.X;
                        break;

                    case "y":
                        paramValues[i] = source.Y;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:46,代码来源:WorldStatsQuestCancelTableDbExtensions.cs

示例9: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IAccountBanTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "account_id":
                        paramValues[i] = (Int32)source.AccountID;
                        break;

                    case "end_time":
                        paramValues[i] = source.EndTime;
                        break;

                    case "expired":
                        paramValues[i] = source.Expired;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "issued_by":
                        paramValues[i] = source.IssuedBy;
                        break;

                    case "reason":
                        paramValues[i] = source.Reason;
                        break;

                    case "start_time":
                        paramValues[i] = source.StartTime;
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:46,代码来源:AccountBanTableDbExtensions.cs

示例10: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IAccountIpsTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "account_id":
                        paramValues[i] = (Int32)source.AccountID;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "ip":
                        paramValues[i] = source.Ip;
                        break;

                    case "time":
                        paramValues[i] = source.Time;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:34,代码来源:AccountIpsTableDbExtensions.cs

示例11: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this ICharacterStatusEffectTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "id":
                        paramValues[i] = (Int32)source.ID;
                        break;

                    case "power":
                        paramValues[i] = source.Power;
                        break;

                    case "status_effect_id":
                        paramValues[i] = (Byte)source.StatusEffect;
                        break;

                    case "time_left_secs":
                        paramValues[i] = source.TimeLeftSecs;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:38,代码来源:CharacterStatusEffectTableDbExtensions.cs

示例12: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IGuildTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "created":
                        paramValues[i] = source.Created;
                        break;

                    case "id":
                        paramValues[i] = (UInt16)source.ID;
                        break;

                    case "name":
                        paramValues[i] = source.Name;
                        break;

                    case "tag":
                        paramValues[i] = source.Tag;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:34,代码来源:GuildTableDbExtensions.cs

示例13: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IWorldStatsGuildUserChangeTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "guild_id":
                        paramValues[i] = (ushort?)source.GuildID;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "user_id":
                        paramValues[i] = (Int32)source.UserID;
                        break;

                    case "when":
                        paramValues[i] = source.When;
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:34,代码来源:WorldStatsGuildUserChangeTableDbExtensions.cs

示例14: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IMapSpawnTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "amount":
                        paramValues[i] = source.Amount;
                        break;

                    case "character_template_id":
                        paramValues[i] = (UInt16)source.CharacterTemplateID;
                        break;

                    case "height":
                        paramValues[i] = source.Height;
                        break;

                    case "id":
                        paramValues[i] = (Int32)source.ID;
                        break;

                    case "map_id":
                        paramValues[i] = (UInt16)source.MapID;
                        break;

                    case "width":
                        paramValues[i] = source.Width;
                        break;

                    case "x":
                        paramValues[i] = source.X;
                        break;

                    case "y":
                        paramValues[i] = source.Y;
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:50,代码来源:MapSpawnTableDbExtensions.cs

示例15: TryCopyValues

        /// <summary>
        /// Copies the column values into the given DbParameterValues using the database column name
        /// with a prefixed @ as the key. The key must already exist in the DbParameterValues
        /// for the value to be copied over. If any of the keys in the DbParameterValues do not
        /// match one of the column names, or if there is no field for a key, then it will be
        /// ignored. Because of this, it is important to be careful when using this method
        /// since columns or keys can be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to copy the values from.</param>
        /// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IQuestRequireFinishQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "quest_id":
                        paramValues[i] = (UInt16)source.QuestID;
                        break;

                    case "req_quest_id":
                        paramValues[i] = (UInt16)source.ReqQuestID;
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:26,代码来源:QuestRequireFinishQuestTableDbExtensions.cs


注:本文中的DbParameterValues.GetParameterName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。