Permalink
Browse files

Merge remote branch 'upstream/master'

Conflicts:
	src/ServiceStack.OrmLite/OrmLiteWriteExtensions.cs
  • Loading branch information...
2 parents db8c45c + 278873a commit 470239eb89132381394949c6842a5a8fb767682d @angelcolmenares angelcolmenares committed Jan 27, 2012
View
@@ -36,4 +36,8 @@ _ReSharper*/
App_Data/
NuGet/*.dll
-*.nupkg
+*.nupkg
+*.pidb
+*.userprefs
+add.sh
+.gitignore
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
@@ -9,7 +9,7 @@ namespace ServiceStack.OrmLite
/// Wrapper IDbConnection class to allow for connection sharing, mocking, etc.
/// </summary>
public class OrmLiteConnection
- : IDbConnection//, IHasDbConnection
+ : IDbConnection, IHasDbConnection
{
private readonly OrmLiteConnectionFactory factory;
private IDbConnection dbConnection;
@@ -170,12 +170,20 @@ public static T PopulateWithSqlReader<T>(this T objWithProperties, IDataReader d
public static T PopulateWithSqlReader<T>(this T objWithProperties, IDataReader dataReader, FieldDefinition[] fieldDefs)
{
- foreach (var fieldDef in fieldDefs)
- {
- var value = dataReader.GetValue(dataReader.GetOrdinal( fieldDef.FieldName ));
- fieldDef.SetValue(objWithProperties, value);
- }
- return objWithProperties;
+ try
+ {
+ foreach (var fieldDef in fieldDefs)
+ {
+ var index = dataReader.GetOrdinal(fieldDef.FieldName);
+ var value = dataReader.GetValue(index);
+ fieldDef.SetValue(objWithProperties, value);
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.Error(ex);
+ }
+ return objWithProperties;
}
@@ -396,4 +404,4 @@ public static IDbTransaction BeginTransaction(this IDbCommand dbCmd, IsolationLe
}
}
-}
+}
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.1.7.*")]
+[assembly: AssemblyVersion("3.3.8.*")]
//[assembly: AssemblyFileVersion("1.0.*")]
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <ProjectView>ShowAllFiles</ProjectView>
+ <ProjectView>ProjectFiles</ProjectView>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />

0 comments on commit 470239e

Please sign in to comment.