elq dll path setting for mono.

This commit is contained in:
kay.one committed 2013-02-16 16:15:09 -08:00
1 parent 2903d5d581
commit 620dc2d086
2 files changed
+15 -1

No files matched your search

+15 -1
View File
@@ -22,7 +22,13 @@ public EloqueraDbFactory(EnvironmentProvider environmentProvider)
public EloqueraDb CreateMemoryDb()
{
if (EnvironmentProvider.IsMono)
{
return InternalCreate("server=(local);password=;options=inmemory", Guid.NewGuid().ToString());
}
return InternalCreate("server=(local);password=;options=inmemory;uselocalpath=" + dllPath, Guid.NewGuid().ToString());
}
public EloqueraDb Create(string dbPath = null)
@@ -34,7 +40,15 @@ public EloqueraDb Create(string dbPath = null)
var file = new FileInfo(dbPath);
return InternalCreate(string.Format("server=(local);password=;usedatapath={0};uselocalpath={1}", file.Directory.FullName, dllPath), file.Name);
if (EnvironmentProvider.IsMono)
{
return InternalCreate(string.Format("server=(local);password=;usedatapath={0}", file.Directory.FullName), file.Name);
}
else
{
return InternalCreate(string.Format("server=(local);password=;usedatapath={0};uselocalpath={1}", file.Directory.FullName, dllPath), file.Name);
}
}
private EloqueraDb InternalCreate(string connectionString, string databaseName)
Binary file not shown.