public async void ReturnAnEntityThatExistsInTheRepository() { _logger.LogInformation("WECOME TO ReturnAnEntityThatExistsInTheRepository!!"); IEntityBusiness <Employee> employeeBusiness = ServiceProvider.GetService <IEntityBusiness <Employee> >(); Employee employee = await employeeBusiness.FindEntityById(2); Assert.True(employee != null); }
public CustomersController( IEntityBusiness <Customer> customerEntityBusiness, IHostingEnvironment hostingEnvironment, ILoggerFactory loggerFactory, ILogger <CustomersController> logger) : base(loggerFactory) { _customerEntityBusiness = customerEntityBusiness; this.hostingEnvironment = hostingEnvironment; _logger = logger; }
public void ReturnEntitiesWhenPresentInDatabase() { IEntityBusiness <Customer> cutomerBusiness = ServiceProvider.GetService <IEntityBusiness <Customer> >(); int? pageSize = 10; string sortCol = "CustomerID"; string sortDir = "ASC"; string searchTerms = string.Empty; int? pageNumber = 1; OperationResult result = cutomerBusiness.ListItems( pageNumber, pageSize, sortCol, sortDir, searchTerms); Assert.True(result.Success); IEnumerable <Customer> list = result.ObjectsDictionary["list"] as IEnumerable <Customer>; Assert.True(list.Count() == pageSize); }
public ChinookController( IEntityBusiness <Artist> artistEntityBusiness, IHostingEnvironment hostingEnvironment) { _artistEntityBusiness = artistEntityBusiness; this.hostingEnvironment = hostingEnvironment; }
public CustomersController(IEntityBusiness <Customer> customerBusiness, ILoggerFactory loggerFactory) : base(loggerFactory) { _customerBusiness = customerBusiness; }
public EntityController(ILogger <EntityController> logger, IEntityBusiness entityBusiness) { this.logger = logger; this.entityBusiness = entityBusiness; }
public EmployeesController(IEntityBusiness <Employee> employeeBusiness, ILoggerFactory loggerFactory) : base(loggerFactory) { _employeeBusiness = employeeBusiness; }
public ArtistsController(IEntityBusiness <Artist> artistEntityBusiness) { _artistEntityBusiness = artistEntityBusiness; }