예제 #1
0
 /// <summary>
 /// 封装NhibernateDbAccess的Delete
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public bool Delete(T o)
 {
     NhibernateDbAccess.Delete(o);
     return(true);
 }
예제 #2
0
 /// <summary>
 /// 封装NhibernateDbAccess的SaveOrUpdateAll
 /// </summary>
 /// <param name="objectList"></param>
 /// <returns></returns>
 public bool SaveOrUpdateAll(List <T> objectList)
 {
     NhibernateDbAccess.SaveOrUpdateAll(objectList);
     return(true);
 }
예제 #3
0
 /// <summary>
 /// 封装NhibernateDbAccess的Update
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public bool Update(T o)
 {
     NhibernateDbAccess.Update(o);
     return(true);
 }
예제 #4
0
 /// <summary>
 /// 封装NhibernateDbAccess的Save
 /// </summary>
 /// <param name="o"></param>
 /// <param name="id"></param>
 /// <returns></returns>
 public bool Save(T o, out object id)
 {
     id = NhibernateDbAccess.Save(o);
     return(true);
 }
예제 #5
0
 /// <summary>
 /// 封装NhibernateDbAccess的SaveOrUpdate
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public bool Save(T o)
 {
     NhibernateDbAccess.SaveOrUpdate(o);
     return(true);
 }
예제 #6
0
 /// <summary>
 /// 封装NhibernateDbAccess的Get(typeof(T), ID)
 /// </summary>
 /// <param name="ID"></param>
 /// <returns></returns>
 public T Load(object ID)
 {
     return(NhibernateDbAccess.Get(typeof(T), ID) as T);
 }
예제 #7
0
 /// <summary>
 /// 封装NhibernateDbAccess的LoadAll
 /// </summary>
 /// <returns></returns>
 public IList <T> GetAll()
 {
     return(NhibernateDbAccess.LoadAll(typeof(T)).OfType <T>().ToList <T>());
 }
예제 #8
0
 /// <summary>
 /// 封装NhibernateDbAccess的DeleteAll
 /// </summary>
 /// <param name="objectList"></param>
 /// <returns></returns>
 public bool DeleteAll(List <T> objectList)
 {
     NhibernateDbAccess.DeleteAll(objectList);
     return(true);
 }