Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit b92206d

Browse files
committed
Update SqlServerConverter Configuration to allow for library files to be named.
Update SqlServerConverter Configuration to allow for library files to be named. Previously, had to clone Configure method if using something other than the defaults.
1 parent 10b19cf commit b92206d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/ServiceStack.OrmLite.SqlServer.Converters/SqlServerConverters.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,22 @@ public static class SqlServerConverters
1010
public static string Msvcr100FileName = "msvcr100.dll";
1111
public static string SqlServerSpatial110FileName = "SqlServerSpatial110.dll";
1212

13-
public static IOrmLiteDialectProvider Configure(IOrmLiteDialectProvider dialectProvider, string libraryPath = null)
13+
public static IOrmLiteDialectProvider Configure(IOrmLiteDialectProvider dialectProvider, string[] fileNames, string libraryPath = null)
1414
{
15-
LoadAssembly(Msvcr100FileName, libraryPath);
16-
LoadAssembly(SqlServerSpatial110FileName, libraryPath);
15+
foreach (var fileName in fileNames)
16+
{
17+
LoadAssembly(fileName, libraryPath);
18+
}
1719

1820
dialectProvider.RegisterConverter<SqlGeography>(new SqlServerGeographyTypeConverter());
1921
dialectProvider.RegisterConverter<SqlGeometry>(new SqlServerGeometryTypeConverter());
2022
dialectProvider.RegisterConverter<SqlHierarchyId>(new SqlServerHierarchyIdTypeConverter());
2123
return dialectProvider;
2224
}
2325

26+
public static IOrmLiteDialectProvider Configure(IOrmLiteDialectProvider dialectProvider, string libraryPath = null) =>
27+
Configure(dialectProvider, new string[] { Msvcr100FileName, SqlServerSpatial110FileName }, libraryPath);
28+
2429
public static void LoadAssembly(string assemblyName, string libraryPath = null)
2530
{
2631
// default libraryPath to Windows System

0 commit comments

Comments
 (0)