Adding some code
It is time to implement all the classes from the preceding class diagram and look at our overall source and project structure.
Let's open Visual Studio and create a blank solution named EmployeeBeneftis.sln
. In this solution, let's add a project of the Class Library type named Domain
.
Tip
To add a blank solution, you need to go to File | New | Project. On the New Project dialog that opens, inside the pane on the left side, locate a tree node named Other Project Types. Inside this node, you will find an item named Visual Studio Solutions. Click on this item, and then, you can choose Blank Solution in the middle pane.
We will now add all the classes to the Domain
project. In order to minimize the compilation errors, we will start with the class that does not refer to other classes. Right-click on the Domain
project in Visual Studio and add a class named Address
. Use the following code for the body of the class:
namespace Domain { public class Address { public...