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


C# SqlDataReader.ToDictionaryAsync方法代码示例

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


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

示例1: MapMessagesDescription

 /// <summary>
 /// Maps the person alerts message.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>
 /// Dictionary of person id and Alert collection
 /// </returns>
 public static async Task<IDictionary<string, Collection<Message>>> MapMessagesDescription(SqlDataReader dataReader)
 {
     return await dataReader.ToDictionaryAsync<Message, Collection<Message>>(
         r => r.Int32Field(AlertId).ToString(CultureInfo.CurrentCulture),
         r => MapMessage(dataReader));
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:13,代码来源:AlertsAndMessageMapper.cs

示例2: MapGuestMessages

 /// <summary>
 /// Maps the person messages.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>Dictionary of personId and Messages</returns>
 public static async Task<IDictionary<string, PersonMessageCollection>> MapGuestMessages(SqlDataReader dataReader)
 {
     return await dataReader.ToDictionaryAsync<PersonMessage, PersonMessageCollection>(
      r => r.Int32Field(GuestId).ToString(CultureInfo.CurrentCulture),
      r => MapPersonMessage(dataReader));
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:11,代码来源:AlertsAndMessageMapper.cs

示例3: MapGuestAlerts

 /// <summary>
 /// Maps the guest alerts.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>Dictionary of person id and Alert collection.</returns>
 public static async Task<IDictionary<string, AlertCollection>> MapGuestAlerts(SqlDataReader dataReader)
 {
     return await dataReader.ToDictionaryAsync<Alert, AlertCollection>(
        r => r.Int32Field(GuestId).ToString(CultureInfo.CurrentCulture),
        r => MapAlert(dataReader));
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:11,代码来源:AlertsAndMessageMapper.cs

示例4: MapVisitorAccessCards

 /// <summary>
 /// Maps the visitor access cards.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>Dictionary of person id and access card collection.</returns>
 public static async Task<IDictionary<string, AccessCardCollection>> MapVisitorAccessCards(SqlDataReader dataReader)
 {
     return await dataReader.ToDictionaryAsync<AccessCard, AccessCardCollection>(
      r => r.Int32Field(VisitorId).ToString(CultureInfo.CurrentCulture),
      r => MapAccessCard(dataReader));
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:11,代码来源:AccessCardMapper.cs

示例5: RetrieveFolios

 /// <summary>
 /// Maps the folios.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns></returns>
 private static async Task<IDictionary<string, FolioCollection>> RetrieveFolios(SqlDataReader dataReader)
 {
     return await dataReader.ToDictionaryAsync<Folio, FolioCollection>(
        r => r.Int32Field(GuestId).ToString(CultureInfo.CurrentCulture),
        r => MapFolio(dataReader));
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:11,代码来源:PersonDataMapper.cs

示例6: MapDictionaryAsync

 /// <summary>
 /// Maps the dictionary asynchronous.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>Dictionary of collection</returns>
 private static async Task<IDictionary<string, Collection<Itinerary>>> MapDictionaryAsync(SqlDataReader dataReader)
 {
     return await dataReader.ToDictionaryAsync<Itinerary, Collection<Itinerary>>(
         r => r.Int32Field(VoyageId).ToString(CultureInfo.CurrentCulture),
         r => MapVoyageItinerary(dataReader));
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:11,代码来源:ReferenceDataMapper.cs


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