blob: a298572629c7ea01ef197f90fad4535fd75958a6 (
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
|
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core;
using Tango.Settings;
namespace Tango.DAL.Remote.DB
{
/// <summary>
/// Represents an SQL Server database context.
/// </summary>
/// <seealso cref="System.Data.Entity.DbContext" />
public partial class RemoteDB : DbContext
{
/// <summary>
/// Initializes a new instance of the <see cref="RemoteDB"/> class.
/// </summary>
/// <param name="path">The server file path.</param>
/// <param name="isFile">if set to <c>true</c> will try to connect to an .mdf file.</param>
public RemoteDB(DataSource dataSource) : base(String.Format("metadata=res://*/DB.RemoteADO.csdl|res://*/DB.RemoteADO.ssdl|res://*/DB.RemoteADO.msl;provider=System.Data.SqlClient;provider connection string=\"{0}\"", dataSource.ToConnection().ConnectionString))
{
}
}
}
|