public DataTable GetAll() { try { GuideDAL guideDAL = new GuideDAL(); return(guideDAL.GetAll()); } catch (Exception) { throw; } }
public DataTable GetById(int id) { try { GuideDAL guideDAL = new GuideDAL(); return(guideDAL.GetById(id)); } catch (Exception) { throw; } }
public bool Delete(Guides guide) { try { GuideDAL guideDAL = new GuideDAL(); return(guideDAL.Delete(guide)); } catch (Exception) { throw; } }
public bool Save(Guides guide) { try { GuideDAL guideDAL = new GuideDAL(); if (IsNameExist(guide)) { throw new Exception("Name already exist."); } else { return(guideDAL.Save(guide)); } } catch (Exception) { throw; } }