本文整理汇总了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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}