public interesse selecionarInteresseComID(int id) { interesse inte = new interesse(); using (ImobGentilEntities db = new ImobGentilEntities()) { inte = (from vi in db.interesse where vi.id == id select vi).FirstOrDefault(); } return(inte); }
public void modificarStatusInteresse(interesse inte) { using (ImobGentilEntities db = new ImobGentilEntities()) { try { db.Entry(inte).State = System.Data.EntityState.Modified; db.SaveChanges(); } catch (Exception) { throw; } } }
public void AdicionarInteresse(interesse inte) { try { using (ImobGentilEntities db = new ImobGentilEntities()) { db.interesse.Add(inte); db.SaveChanges(); } } catch (Exception e) { throw e; //MessageBox.Show(e.Message); } }