Posts Tagged DI

Spring.Net simple IoC example

Here is another IoC example using Spring.Net similar to the Movie Finder example taken from Martin Fowler’s article.
This example return a list of all employees that match the specified department and demonstrates how the Spring.Net IoC container can be used to supply an appropriate

IEmployeeService implementation to an arbitrary EmployeeService instance.

Create new console application project called EmployeeFinder, and add the following references to use in this example.

Spring.Net

Spring.Net is an application framework that provides comprehensive infrastructural support for developing enterprise .Net application (taken from Spring.Net documentation). Spring.Net is based from Java version of Spring framework that widely known as very useful application framework to develop an enterprise application using Java.
Spring.Net contain a lot of feature and organized into modules shown bellow.

Spring.Core module [...]