//Buscar Nombre static public IEnumerable <object> GetName(this estadoUsuarioBLL e) { var x = (from t in ctx.estadoUsuario select new { Id = t.id, Estado = t.nombre, Descripcion = t.descripcion }).ToList(); return(x); }
//METODOS //Salvar static public void Save(this estadoUsuarioBLL a, estadoUsuario obj) { var x = ctx.estadoUsuario.Find(obj.id); if (x != null) { ctx.Entry(x).CurrentValues.SetValues(obj); } else { ctx.estadoUsuario.Add(obj); } ctx.SaveChanges(); }