blob: 6fdd35983abd97e7cc80b6da46bb71f4ce2efb53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.DAL.Remote.DB
{
public partial class RemoteDB : DbContext
{
public RemoteDB(String path, bool isFile) : base(ComposeConnectionString(path, isFile))
{
}
private static String ComposeConnectionString(String source, bool isFile)
{
if (!isFile)
{
return String.Format("metadata=res://*/DB.RemoteADO.csdl|res://*/DB.RemoteADO.ssdl|res://*/DB.RemoteADO.msl;provider=System.Data.SqlClient;provider connection string=\"data source={0};initial catalog=Tango;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework\"", source);
}
else
{
return null;
}
}
}
}
|