Created
December 7, 2018 17:11
-
-
Save milannankov/60b67780c384f18062e08e378ee4bd91 to your computer and use it in GitHub Desktop.
value-objects-usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var context = new CompanyContext()) | |
{ | |
var company = new Company(Guid.NewGuid(), "My Company"); | |
company.AssignAddress(new CompanyAddress("Sofia", "Mladost 4")); | |
company.AssignAddress(new CompanyAddress("Plovdiv", "blvd. Bulgaria 105")); | |
context.Companies.Add(company); | |
context.SaveChanges(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment