public ReservaPacote FindById(ReservaPacote reservaPacote) { using (var db = new Contexto()) { return(db.ReservasPacotes.Find(reservaPacote.ReservaPacoteId)); } }
public void Create(ReservaPacote reservaPacote) { using (var db = new Contexto()) { db.ReservasPacotes.Add(reservaPacote); db.SaveChanges(); } }
public void Delete(ReservaPacote reservaPacote) { using (var db = new Contexto()) { ReservaPacote reservaPacoteDB = FindById(reservaPacote); if (reservaPacoteDB != null) { db.ReservasPacotes.Attach(reservaPacote); db.ReservasPacotes.Remove(reservaPacote); db.SaveChanges(); } } }
public void ExcluirReservaPacote(ReservaPacote reservaPacote) { dao.Delete(reservaPacote); }
public void CadastrarReservaPacote(ReservaPacote reservaPacote) { dao.Create(reservaPacote); }