CacheDataBase.cs 521 B

12345678910111213141516171819202122
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace ProjectManagementSystem.Common.Models
  8. {
  9. public class CacheDataBase
  10. {
  11. [JsonIgnore]
  12. public int Status { get; set; }
  13. [JsonIgnore]
  14. public DateTime LastUpdateTime { get; set; }
  15. [JsonIgnore]
  16. public bool DataValid
  17. {
  18. get { return (DateTime.Now - LastUpdateTime).TotalSeconds < 5; }
  19. }
  20. }
  21. }