public static List <Configuration> GetValues(string siteUrl, List <string> keys) { if (instance == null) { instance = new ConfigurationDAL(siteUrl); } string queryStr = BuildQueryByKeys(keys); return(instance.GetByQuery(queryStr)); }
/// <summary> /// Get value of key from configuration list. /// </summary> /// <param name="siteUrl">The site url.</param> /// <param name="key">The key which needs to get value.</param> /// <returns></returns> public static string GetValue(string siteUrl, string key) { if (instance == null) { instance = new ConfigurationDAL(siteUrl); } string value = string.Empty; var configurations = GetValues(siteUrl, new List <string>() { key }); if (configurations != null && configurations.Count > 0) { var configuration = configurations[0]; value = configuration.Value; } return(value); }