private List<Entidade> ListarEntidades() { using (Context db = new Context()) { EntidadeBLL bll = new EntidadeBLL(db, -999); return bll.Find().ToList(); } }
private Entidade BuscarEntidade(string idEntidade) { using (Context db = new Context()) { EntidadeBLL bll = new EntidadeBLL(db, -999); int id = Convert.ToInt32(idEntidade); return bll.FindSingle(e => e.idEntidade == id); } }