public CounterService() { var factory = new DatabaseFactory(); _activityBusinessLogic = new ActivityBusinessLogic(new ActivityRepository(factory), new TagBusinessLogic(new TagRepository(factory)) , new DictionaryBusinessLogic<ActivityType>(new DictionaryRepository<ActivityType>(factory)) ); _contactBusinessLogic = new ContactBusinessLogic(new ContactRepository(factory), new DictionaryBusinessLogic<ContactType>(new DictionaryRepository<ContactType>(factory)), new DictionaryBusinessLogic<ContactStatus>(new DictionaryRepository<ContactStatus>(factory)), new DictionaryBusinessLogic<AgeDirection>(new DictionaryRepository<AgeDirection>(factory)), new DictionaryBusinessLogic<ReadyToSellState>(new DictionaryRepository<ReadyToSellState>(factory))); }
private void GivenUserEntersFilePath() { //Arrange _filePath = "invalidpath.txt"; _fileBusinessLogic = new FileBusinessLogic(); _eventBroker = new Mock <IEventBroker>(); _contactBusinessLogic = new ContactBusinessLogic(new ContactModelFactory(new MapperService(), _eventBroker.Object)); _fileService = new FileService(_fileBusinessLogic); _contactService = new ContactService(_contactBusinessLogic); _outputWriter = new ConsoleOutputWriter(); _configurationSettingProvider = new ConfigurationSettingProvider(); _contactManager = new ContactManager(_fileService, _contactService, _outputWriter, _configurationSettingProvider); _eventBroker.Setup(x => x.Raise(new ContactRegisteredEvent(_outputWriter))); }
public static Company ConvertToDbCompany(this CompanyModel model, ICompanyBusinessLogic companyBusinessLogic , IContactBusinessLogic contactBusinessLogic) { var company = companyBusinessLogic.GetById(model.Id); company.Comment = model.Comment; //company.CreateDate = DateTime.Now; company.Name = model.Name; company.Sites.AddRange(companyBusinessLogic.GetAllSites(company.Id)); //company.IsDeleted = false; company.Type = companyBusinessLogic.GetAllTypes().First(x => x.Id == model.TypeId); company.Size = companyBusinessLogic.GetAllSizes().First(x => x.Id == model.SizeId); company.Sector = companyBusinessLogic.GetAllSectors().First(x => x.Id == model.SectorId); company.Status = companyBusinessLogic.GetAllStatuses().First(x => x.Id == model.StatusId); company.Owner = contactBusinessLogic.GetById(model.OwnerId); return company; }
public ContactsController(IContactBusinessLogic contactBusinessLogic) { _contactBusinessLogic = contactBusinessLogic; }
public CompaniesController(ICompanyBusinessLogic companyBusinessLogic, IContactBusinessLogic contactBusinessLogic) { _companyBusinessLogic = companyBusinessLogic; _contactBusinessLogic = contactBusinessLogic; }
public ContactService( IContactBusinessLogic contactBusinessLogic ) { _contactBusinessLogic = contactBusinessLogic; }
public ContactController(IMapper mapper, IContactBusinessLogic contactBusinessLogic) : base(mapper) { this.contactBusinessLogic = contactBusinessLogic; }
public LeadController(IContactBusinessLogic contactBusinessLogic, ILeadTypeBusinessLogic leadTypeBusinessLogic, ILeadBusinessLogic leadBusinessLogic) { _contactBusinessLogic = contactBusinessLogic; _leadTypeBusinessLogic = leadTypeBusinessLogic; _leadBusinessLogic = leadBusinessLogic; }