摘要: namespace Service{ public class Service<TEntity> : IService<TEntity> where TEntity : class,Entity.IEntity { private IRepository<TEntity> iRepository = null; public Service() { iRepository = new Repository<TEntity>(); } #region IService<TEntity> 成员 public TEntity GetMode 阅读全文
posted @ 2011-11-08 13:40 张占岭 阅读(2108) 评论(0) 推荐(1) 编辑
摘要: namespace Data.TEST{ /// /// 数据通用操作实现 /// /// public class Repository : TESTRepositoryBase, IRepository where TEntity : class,IEntit... 阅读全文
posted @ 2011-11-08 13:36 张占岭 阅读(5944) 评论(2) 推荐(2) 编辑
摘要: namespace Data.TEST{ /// <summary> /// 数据操作基类 /// </summary> public abstract class TESTRepositoryBase { /// <summary> /// 数据库基类 /// </summary> protected Entity.TEST.LinqTESTDataContext _db = (Entity.TEST.LinqTESTDataContext)DbFactory.Intance("TEST", System.Threading 阅读全文
posted @ 2011-11-08 13:34 张占岭 阅读(1720) 评论(0) 推荐(1) 编辑
摘要: namespace Data{ /// <summary> /// 数据库建立工厂 /// Created By : 张占岭 /// Created Date:2011-10-14 /// Modify By: /// Modify Date: /// Modify Reason: /// </summary> internal static class DbFactory { static Sy... 阅读全文
posted @ 2011-11-08 13:33 张占岭 阅读(2365) 评论(0) 推荐(0) 编辑