namespace IStation.Service
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public partial class AnalysisCombine
|
{
|
|
/// <summary>
|
///
|
/// </summary>
|
/// <returns></returns>
|
private static Dictionary<string, List<Model.AnalysisCombine>> GetDictCache()
|
{
|
return AnalysisCombineCacheHelper.GetSet(() =>
|
{
|
var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisCombine>();
|
var entity_dict = dal.GetAllTable();
|
if (entity_dict == null || !entity_dict.Any())
|
{
|
return new Dictionary<string, List<Model.AnalysisCombine>>();
|
}
|
|
var model_dict = new Dictionary<string, List<Model.AnalysisCombine>>();
|
for (int i = 0; i < entity_dict.Count; i++)
|
{
|
var entity_item = entity_dict.ElementAt(i);
|
model_dict[entity_item.Key] = Entity2Models(entity_item.Value);
|
}
|
return model_dict;
|
}, ConfigHelper.CacheKeepTime, ConfigHelper.CacheRandomTime);
|
}
|
|
}
|
}
|