Source

Camino / src / Empi.Camino / ConnectionsStrings.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Empi.Camino.Configuration;

namespace Empi.Camino
{
    internal static class ConnectionsStrings
    {
        //internal static string CurrentRetailerConnectionString
        //{ 
        //    get
        //    {
        //        var repository = Empi.Camino.Data.Meta.MetaDataRepository<Empi.Camino.Data.Meta.ConnectionStrings>.GetCachedMetaDataRepository.Single(v => ((v.Id == RetailerSettings.GetRetailerSettings.MyDbId) && (v.State == RetailerSettings.GetRetailerSettings.MyDbState)));
        //        return repository.ConnectionString;
        //    }
        //}

        internal static string GetConnectionString(string dbId, string dbState)
        {
            var repository = Empi.Camino.Data.Meta.MetaDataRepository<Empi.Camino.Data.Meta.ConnectionStrings>.GetCachedMetaDataRepository.Single(v => ((v.Id == dbId) && (v.State == dbState)));
            return repository.ConnectionString;
        }
    }
}