Exemplo n.º 1
0
        private void ThrowIfOtherUser(ChangePlan command)
        {
            if (!string.IsNullOrWhiteSpace(command.PlanId) && planOwner != null && !planOwner.Equals(command.Actor))
            {
                throw new ValidationException("Plan can only be changed from current user.");
            }

            if (string.Equals(command.PlanId, planId, StringComparison.OrdinalIgnoreCase))
            {
                throw new ValidationException("App has already this plan.");
            }
        }