mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
wtf git extentions?
This commit is contained in:
parent
3ab04fd213
commit
b25ab20f14
20 changed files with 169 additions and 76 deletions
25
NzbDrone.SqlCe/SqlCeProxy.cs
Normal file
25
NzbDrone.SqlCe/SqlCeProxy.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System.Data.Common;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.IO;
|
||||
|
||||
namespace NzbDrone.SqlCe
|
||||
{
|
||||
public class SqlCeProxy
|
||||
{
|
||||
public void EnsureDatabase(string constr)
|
||||
{
|
||||
var connection = new SqlCeConnection(constr);
|
||||
|
||||
if (!File.Exists(connection.Database))
|
||||
{
|
||||
var engine = new SqlCeEngine(constr);
|
||||
engine.CreateDatabase();
|
||||
}
|
||||
}
|
||||
|
||||
public DbProviderFactory GetSqlCeProviderFactory()
|
||||
{
|
||||
return new SqlCeProviderFactory();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue