TopicClassService.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using CB.Entity;
  4. using CB.Interface.Infrastructure;
  5. namespace CB.Data
  6. {
  7. //DT_TopicClass
  8. public class TopicClassService
  9. {
  10. public static bool Save(TopicClassInfo entity)
  11. {
  12. var ok = DatabaseProvider.GetDbProvider<ITopicClassService>().Save(entity);
  13. CB.Cache.CBCache.GetCacheService().RemoveObject(CB.Cache.CacheKeys.TopicClasList);
  14. return ok;
  15. }
  16. public static bool Update(TopicClassInfo entity)
  17. {
  18. throw new NotImplementedException();
  19. }
  20. public static bool Delete(int id)
  21. {
  22. var ok = DatabaseProvider.GetDbProvider<ITopicClassService>().Delete(id);
  23. CB.Cache.CBCache.GetCacheService().RemoveObject(CB.Cache.CacheKeys.TopicClasList);
  24. return ok;
  25. }
  26. public static TopicClassInfo Get(int id)
  27. {
  28. return DatabaseProvider.GetDbProvider<ITopicClassService>().Get(id);
  29. }
  30. public static IList<TopicClassInfo> ToList()
  31. {
  32. return DatabaseProvider.GetDbProvider<ITopicClassService>().ToList();
  33. }
  34. public static IList<TopicClassInfo> ToPaging(TopicClassInfo entity, int pageSize, int pageIndex, out int recordCount)
  35. {
  36. return DatabaseProvider.GetDbProvider<ITopicClassService>().ToPaging(entity, pageSize, pageIndex, out recordCount);
  37. }
  38. }
  39. }