Hello. Faced such a problem - you need to implement singleton with the ability to work with different databases (well, let's say my connections are in the Setting class). Through DataManager (singleton) I work with repositories that are inherited from BaseRepository
public sealed class DataManager { public FabricRepository Fabric { get; set; } public FabricProductRepository FabricProduct { get; set; } public FittingRepository Fitting { get; set; } public FittingProductRepository FittingProduct { get; set; } public OrderRepository Order { get; set; } public ProductOrderRepository ProductOrder { get; set; } public ProductRepository Product { get; set; } public StockFabricRepository StockFabric { get; set; } public StockFittingRepository StockFitting { get; set; } public UserRepository User { get; set; } private DataManager() { Fabric = new FabricRepository(); FabricProduct = new FabricProductRepository(); Fitting = new FittingRepository(); FittingProduct = new FittingProductRepository(); Order = new OrderRepository(); ProductOrder = new ProductOrderRepository(); Product = new ProductRepository(); StockFabric = new StockFabricRepository(); StockFitting = new StockFittingRepository(); User = new UserRepository(); } static DataManager _active = null; static object _syncRoot = new object(); public static DataManager Instance { get { if (_active == null) lock (_syncRoot) if (_active == null) _active = new DataManager(); return _active; } } } abstract public class BaseRepository<T> where T : class, new() { public string TableName { get; set; } private List<T> List = new List<T>(); public BaseRepository() { this.TableName = typeof(T).Name; } public virtual ICollection<T> GetList() { FillList(); return List; } Here's an example of how I add data to the database: DataManager.Instance.User.Add (user); I think it is necessary to create the SqlConnection field in the singleton class?