blob: e54ef31616779ec61c059bafcc5e6377ddb58ef4 (
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
|
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using Tango.BL;
using Tango.Core;
namespace Tango.Web.Helpers
{
public static class ObservablesWebContext
{
public static ObservablesContext CreateContext(String catalog = null)
{
return new ObservablesContext(new DataSource()
{
Address = WebConfig.DB_ADDRESS,
Catalog = catalog != null ? catalog : WebConfig.DB_CATALOG,
IntegratedSecurity = false,
Type = DataSourceType.SQLServer,
UserName = WebConfig.DB_USER_NAME,
Password = WebConfig.DB_PASSWORD
});
}
}
}
|