public AppCustomerModel GetCustomerModel(int custNo) { //ask for a entity with the id from the Infrastructure repository CustomerEntity customerEntity = customerRepository.GetCustomer(custNo); //check against business rules using ruleService in the domain layer ruleService.Execute(customerEntity); AppCustomerModel customerModel = mapper.Map <AppCustomerModel>(customerEntity); return(customerModel); }