This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Create EF context that will connect to Azure shard. | |
/// </summary> | |
/// <param name="operational">True if connecting for operational data (as opposed to historical). My solution only contains 2 shards so I can use bool. This could, for instance, simply be the integer parameter of the needed shard.</param> | |
public ShardContext(bool operational) : base(ShardManagement.GetRegularConnection(operational), true) | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement; // nuget package | |
using System; | |
using System.Configuration; | |
using System.Data.Common; | |
using System.Data.SqlClient; | |
using System.Diagnostics; | |
using System.Linq; | |
namespace ISharded.Data | |
{ |
NewerOlder