/// <summary> /// Dependency Injection to database repositories. /// </summary> /// <param name="unitOfWork"> Point to context of dataBase </param> public UserService(IIdentityUnitOfWork unitOfWork) { Database = unitOfWork; // Using Factory Method. MapperCreator creator = new IdentityCreator(); IWrappedMapper wrappedMapper = creator.FactoryMethod(); mapper = wrappedMapper.CreateMapping(); }
/// <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(); }
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(); }
public TokenService(IIdentityUnitOfWork unitOfWork, IConfiguration configuration) { Database = unitOfWork; Configuration = configuration; // Using Factory Method. MapperCreator creator = new IdentityCreator(); IWrappedMapper wrappedMapper = creator.FactoryMethod(); mapper = wrappedMapper.CreateMapping(); }
public IMapper GetMapper() { _wrappedMapper = FactoryMethod(); return(_wrappedMapper.CreateMapping()); }