I have the following problem, I have a global variable public static bool HouveAlteracaoBD { get; set; }
and I need to monitor it when there is a change in its value, since I want to follow the following logic:
if(Houve alteração na variável global "HouveAlteracaoBD" == true)
{
CadEmpresaEntity cadEmpresa = new CadEmpresaFacade().GetCadEmpresa(empresaId, ref resultado);
cadEmpresa.Ativa = true;
new CadEmpresaFacade().Alterar(cadEmpresa, ref resultado);
}
My problem is in the expression of if, I need to wait for the global variable to undergo a change, but I do not know how to do that, if anyone can help I thank.