Esempio n. 1
0
        private static void ValidateCommand(IUserIdAndNameCommand command)
        {
            var specification = new UserIdAndNameSpecification();

            if (!specification.IsSatisfiedBy(command))
            {
                throw new ArgumentException(specification.GetReasonsForDissatisfactionSeparatedWithNewLine());
            }
        }
Esempio n. 2
0
 private void AddAuditTrailEntry(IUserIdAndNameCommand command, User user)
 {
     auditTrail.AddEntry(command.UserId, user.Name, command.Name, "Käyttäjätunnus luotu");
 }