Example #1
0
 public static IEnumerable <ConnectionEntity> GetDefaultConnectionList()
 {
     if (Connections == null)
     {
         ConfigureModel model = new ConfigureModel();
         Connections = model.GetConnectionList(Configure.DEFAULT_CONNECTION_CONFIG_NAME).ToList();
     }
     return(Connections);
 }
Example #2
0
 public static ConnectionEntity Find(string ConnectionName, string FilePath = "")
 {
     if (string.IsNullOrEmpty(FilePath))
     {
         return(GetDefaultConnectionList().FirstOrDefault(p => p.ConnectionName == ConnectionName));
     }
     else
     {
         ConfigureModel model = new ConfigureModel();
         return(model.GetConnectionList(FilePath).FirstOrDefault(p => p.ConnectionName == ConnectionName));
     }
 }