從網上下載一個網站,說是三層結構,可是不知道這樣設計有什么好處.望哪位大俠不吝賜教.??? public class BaseEntity
public interface IBaseDAL<T> where T : BaseEntity??
??? public abstract class BaseDAL<T> : IBaseDAL<T> where T : BaseEntity, new()
public class BaseBLL<T> where T : BaseEntity, new()
?public class User:BaseEntity
?idal:public interface User : IBaseDAL<MSFrame.Main.Entity.User>
?dal:public class User : BaseDAL<MSFrame.Main.Entity.User>, Jide.MSFrame.Main.IDAL.User
bll:public class User:BaseBLL<MSFrame.Main.Entity.User>
?public class BLLFactory<T> where T : class
?
使用時大概就是這樣的:
Entity.User model = new MSFrame.Main.Entity.User();
BLLFactory<MSFrame.Main.BLL.User>.Instance.Insert2(model);
我想知道為什么要定義以上這些類,這些類有什么作用,這樣有什么好處.
沒專家分了,望大俠們不吝賜教.
- 0 回答
- 0 關注
- 508 瀏覽
添加回答
舉報
0/150
提交
取消