Ejemplo n.º 1
0
        /// <summary>
        /// Dependency Injection to database repositories.
        /// </summary>
        /// <param name="uow"> Point to context of dataBase </param>
        public TeamService(IUnitOfWork uow)
        {
            db = uow;

            // Using Factory Method.
            MapperCreator  creator       = new CommonCreator();
            IWrappedMapper wrappedMapper = creator.FactoryMethod();

            mapper = wrappedMapper.CreateMapping();
        }
Ejemplo n.º 2
0
        public TaskService(IUnitOfWork uow, IEmailService emailService)
        {
            db = uow;
            this.emailService = emailService;

            // Using Factory Method.
            MapperCreator  creator       = new CommonCreator();
            IWrappedMapper wrappedMapper = creator.FactoryMethod();

            mapper = wrappedMapper.CreateMapping();
        }