public SetupDatabaseTest() { ObjectFactory.Initialize(SimpleInjectorIoCContainer.Prepare(false)); _customerBusinessLogic = ObjectFactory.GetInstance <ICustomerBusinessLogic>(); _transactionBusinessLogic = ObjectFactory.GetInstance <ITransactionBusinessLogic>(); }
public InvoiceController(InvoiceBusinessLogic invoiceLogic, DetailLineBusinessLogic detailLogic, CustomerBusinessLogic customerLogic) { _invoiceLogic = invoiceLogic; _detailLogic = detailLogic; _customerLogic = customerLogic; }
public InvoiceBusinessLogic(UnitOfWork uow, DetailLineBusinessLogic detailLineBusinessLogic, CustomerBusinessLogic customerBusinessLogic, ProductBusinessLogic productBusinessLogic) { _uow = uow; _detailLineBusinessLogic = detailLineBusinessLogic; _customerBusinessLogic = customerBusinessLogic; _productBusinessLogic = productBusinessLogic; }
/// <summary> /// Initializes a new instance of the <see cref="ProductBusinessLogic"/> class. /// </summary> /// /// <param name="dataAccess">ICMN110051DataAccess</param> /// /// <param name="dataContext">IDataContext</param> public ProductBusinessLogic(IDataContext context, IBaseRepository <Product> repository) : base(context) { _iCust = StartupExtensions.Resolve <ICustomerBusinessLogic>(); }
public CustomersController(ICustomerBusinessLogic customerBusinessLogic) { _customerBusinessLogic = customerBusinessLogic; }
public CustomerController(CustomerBusinessLogic customerLogic, InvoiceBusinessLogic invoiceLogic) { _customerLogic = customerLogic; _invoiceLogic = invoiceLogic; }
public async Task <IActionResult> Post([FromBody] RegistrationViewModel model, [FromServices] ICustomerBusinessLogic _service) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var userIdentity = _mapper.Map <AppUser>(model); var result = await _userManager.CreateAsync(userIdentity, model.Password); if (!result.Succeeded) { return(new BadRequestObjectResult(Errors.AddErrorsToModelState(result, ModelState))); } await Task.FromResult(_service.InsertCustomer(new Customer { IdentityId = userIdentity.Id, Location = model.Location })); return(new OkObjectResult("Account created")); }
public CustomerController(ICustomerBusinessLogic customerBusinessLogic, ILogger <CustomerController> logger) { _customeBusinessLogic = customerBusinessLogic; _logger = logger; }