public interface IDao<T, IdT>如何使用?
着是nhibernate的一个封装的一段代码,请我这个IDao<T, IdT>是什么意思呢?
主要是怎么使用呢?
public interface IDao<T, IdT> { T GetById(IdT id, bool shouldLock); T Save(T entity); void Delete(T entity); } public interface ICustomerDao : IDao<Customer, string> { } public abstract class AbstractNHibernateDao<T, IdT> : IDao<T, IdT> { public T GetById(IdT id, bool shouldLock) { T entity; entity = default(T); return entity; } public T Save(T entity) { return entity; } public void Delete(T entity) { ; } }