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


C# IDataRecord.GetNullableInt16方法代码示例

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


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

示例1: MapRecordToDao

 /// <summary>
 /// Maps a record returned from the database to a DAO.
 /// </summary>
 /// <param name="record">Record with the data to map to a DAO.</param>
 /// <returns>DAO mapped from the data in the record.</returns>
 private ApplicationLogDao MapRecordToDao(IDataRecord record)
 {
     return new ApplicationLogDao
     {
         AppDomainName = record.GetString("AppDomainName"),
         Assembly = new AssemblyDao
         {
             AssemblyFullName = record.GetString("AssemblyFullName"),
             AssemblyName = record.GetString("AssemblyName"),
             CreatedBy = record.GetString("AssemblyCreatedBy"),
             CreatedOn = record.GetDateTime("AssemblyCreatedOn"),
             Id = record.GetInt32("AssemblyId"),
             LastUpdatedBy = record.GetString("AssemblyLastUpdatedBy"),
             LastUpdatedOn = record.GetDateTime("AssemblyLastUpdatedOn"),
             VersionBuild = record.GetInt32("VersionBuild"),
             VersionMajor = record.GetInt32("VersionMajor"),
             VersionMinor = record.GetInt32("VersionMinor"),
             VersionRevision = record.GetInt32("VersionRevision")
         },
         AssemblyId = record.GetInt32("AssemblyId"),
         CorrelationId = record.GetNullableGuid("CorrelationId"),
         CorrelationIndex = record.GetNullableInt16("CorrelationIndex"),
         CreatedBy = record.GetString("CreatedBy"),
         CreatedOn = record.GetDateTime("CreatedOn"),
         Data = record.GetNullableXml("Data"),
         HelpLink = record.GetNullableString("HelpLink"),
         Id = record.GetInt64("Id"),
         LastUpdatedBy = record.GetString("LastUpdatedBy"),
         LastUpdatedOn = record.GetDateTime("LastUpdatedOn"),
         MachineName = record.GetString("MachineName"),
         Message = record.GetNullableString("Message"),
         ProcessId = record.GetInt32("ProcessId"),
         Source = record.GetString("Source"),
         StackTrace = record.GetNullableString("StackTrace"),
         ThreadId = record.GetString("ThreadId"),
         TraceEventType = (TraceEventType) record.GetInt32("TraceEventType"),
         TraceId = record.GetInt32("TraceId"),
         TraceListenerName = record.GetNullableString("TraceListenerName")
     };
 }
开发者ID:mike-dempster,项目名称:Pelorus,代码行数:45,代码来源:ApplicationLogRepository.cs


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