using System; using System.Collections.Generic; using CB.Entity; using CB.Interface.Infrastructure; namespace CB.Data { //DT_TopicClass public class TopicClassService { public static bool Save(TopicClassInfo entity) { var ok = DatabaseProvider.GetDbProvider().Save(entity); CB.Cache.CBCache.GetCacheService().RemoveObject(CB.Cache.CacheKeys.TopicClasList); return ok; } public static bool Update(TopicClassInfo entity) { throw new NotImplementedException(); } public static bool Delete(int id) { var ok = DatabaseProvider.GetDbProvider().Delete(id); CB.Cache.CBCache.GetCacheService().RemoveObject(CB.Cache.CacheKeys.TopicClasList); return ok; } public static TopicClassInfo Get(int id) { return DatabaseProvider.GetDbProvider().Get(id); } public static IList ToList() { return DatabaseProvider.GetDbProvider().ToList(); } public static IList ToPaging(TopicClassInfo entity, int pageSize, int pageIndex, out int recordCount) { return DatabaseProvider.GetDbProvider().ToPaging(entity, pageSize, pageIndex, out recordCount); } } }