private DateTime GetLatestTimeFromRedis(string code, DateTime currentTime) { var key = string.Format("{0}-{1}", code, currentTime.Year); var res = redisReader.HGetAllFields(key).ConvertTo <DateTime>(); if (res == null || res.Count == 0) { return(default(DateTime)); } return(res.Max()); }
private List <DateTime> GetExistedDateInRedis(string code, DateTime begin, DateTime end) { var allExistedInRedis = redisReader.HGetAllFields(code).ConvertTo <DateTime>(); return(allExistedInRedis.Where(c => c >= begin && c <= end).ToList()); }