SysConfigLogic.cs 759 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using CZFW.Framework.Interface;
  4. using CZFW.Framework.Model.Entity;
  5. namespace CZFW.Framework.Logic
  6. {
  7. public class SysConfigLogic : LogicBase<SysConfigEntity>, ISysConfig
  8. {
  9. public IList<SysConfigEntity> GetAllSysConfig()
  10. {
  11. return Queryable.ToList();
  12. }
  13. public SysConfigEntity GetSysConfigById(int id)
  14. {
  15. return GetEntity(id);
  16. }
  17. public IList<SysConfigEntity> GetSysConfig(params string[] keyList)
  18. {
  19. return GetEntities(x => keyList.Contains(x.Key));
  20. }
  21. public SysConfigEntity GetSysConfigByKey(string key)
  22. {
  23. return GetEntity(x => x.Key == key);
  24. }
  25. }
  26. }