Exemplo n.º 1
0
        protected override void Validate()
        {
            if (!CNPJ.IsValid)
            {
                Notify(CNPJ.GetNotifications());
            }

            if (!Proprietario.IsValid)
            {
                Notify(Proprietario.GetNotifications());
            }

            Notify
            (
                AssertionConcern.AssertNotEmpty(Nome, "Nome não pode ser vazio ou nulo"),
                AssertionConcern.AssertIsGreaterThan(Rendimentos, 0, "Informe o valor dos Rendimentos")
            );
        }