Exemplo n.º 1
0
        /// <summary>
        /// Inicializa una nueva instancia de la clase <see cref="T:Categoria>Service"/>.
        /// </summary>
        /// <remarks>
        /// Constructor de la clase <see cref="T:CategoriaServices"/>.
        /// </remarks>
        public EntityBServices(): base()
        {
            this.unityContainer.RegisterType<DbContext, MyDomainUnitOfWork>(this.contextPerTestLifeTimeManager, new InjectionConstructor(this.connString));

            // registramos el repositorio de la entidad
            this.unityContainer.RegisterType<IEntityBRepository, EntityBRepository>(new PerResolveLifetimeManager());

            //logger = LoggerManager.GetLogger(GetType());
            //this.logger.Debug(string.Format(CultureInfo.InvariantCulture, "Created repository for type: {0}", typeof(EntityB).Name));
            this.entityBMapper = new EntityBMapper();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Inicializa una nueva instancia de la clase <see cref="T:Categoria>Service"/>.
        /// </summary>
        /// <remarks>
        /// Constructor de la clase <see cref="T:CategoriaServices"/>.
        /// </remarks>
        public EntityBServices() :
            base()
        {
            this.unityContainer.RegisterType <DbContext, BootstrapUnitOfWork>(this.contextPerTestLifeTimeManager, new InjectionConstructor(this.connString));

            // registramos el repositorio de la entidad
            this.unityContainer.RegisterType <IEntityBRepository, EntityBRepository>(new PerResolveLifetimeManager());

            //logger = LoggerManager.GetLogger(GetType());
            //this.logger.Debug(string.Format(CultureInfo.InvariantCulture, "Created repository for type: {0}", typeof(EntityB).Name));
            this.entityBMapper = new EntityBMapper();
        }