Esempio n. 1
0
 /// <summary>
 /// Construtor da entidade UserLog
 /// </summary>
 /// <param name="command">comando de criação do Log do Usuário</param>
 public UserLog(CreateUserLogCommand command)
 {
     this.UserLogId   = Guid.NewGuid();
     this.Description = command.Description;
     this.LogType     = command.LogType;
     this.CreatedOn   = DateTime.Now;
 }
        public UserLog Create(CreateUserLogCommand command)
        {
            var userLog = new UserLog(command);

            userLog.CreateUserlog(userLog);

            _repository.Create(userLog);

            if (Commit())
            {
                return(userLog);
            }

            return(null);
        }