Ejemplo n.º 1
0
        private void Initialize(CreateApplicationLogInputDto log, EntityDependency[] dependencies)
        {
            RegisterCommandRepositoryFactory <ApplicationLog>(() => new ApplicationLogCommandRepository());

            RootEntity = new ApplicationLog
            {
                Type          = log.Type,
                UserId        = log.UserId,
                Source        = log.Source,
                Message       = log.Message,
                Data          = log.Data,
                Url           = log.Url,
                StackTrace    = log.StackTrace,
                HostIpAddress = log.HostIpAddress,
                UserIpAddress = log.UserIpAddress,
                UserAgent     = log.UserAgent
            };

            Enqueue(new InsertEntityCommandOperation <ApplicationLog>(RootEntity, dependencies));
        }
Ejemplo n.º 2
0
 public CreateApplicationLogCommandAggregate(CreateApplicationLogInputDto log, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(ApplicationLogsConnectionClass.GetConnectionName()))
 {
     Initialize(log, dependencies);
 }