public TblNotes getNotes(int id) { TblNotes obj = (TblNotes)NHSession.CreateCriteria(typeof(TblNotes)) .Add(Restrictions.Eq(Constants.allModelProperties.NotesId, id)) .UniqueResult(); return(obj); }
public bool DeleteNotes(TblNotes notes) { bool result = false; using (ITransaction T = NHSession.BeginTransaction()) { try { NHSession.Delete(notes); T.Commit(); result = true; } catch (Exception ex) { T.Rollback(); } } return(result); }