d-webservice-example/source/d_webservice_example/component_registration.d

15 lines
590 B
D
Raw Normal View History

2018-12-18 22:18:06 +01:00
module d_webservice_example.component_registration;
import aermicioi.aedi;
2018-12-18 22:18:06 +01:00
void registerComponents(ConfigurableContainer container) @safe
{
import d_webservice_example.business.todo_service : TodoRepository, TodoService;
import d_webservice_example.controller.todo_controller : TodoController;
import d_webservice_example.dataaccess.in_memory_todo_repository : InMemoryTodoRepository;
container.configure.register!(TodoRepository, InMemoryTodoRepository);
container.configure.register!TodoService.autowire;
container.configure.register!TodoController.autowire;
2018-12-18 22:18:06 +01:00
}