-
-
Save jjeffers/c6c7c3e39fc661ec0eca to your computer and use it in GitHub Desktop.
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
public static Company CreateCompany(string name) | |
{ | |
if (name == null) throw new ArgumentNullException("name"); | |
var company = new Company {Name = name, Address = "100 My Address, SomeWhere NC"}; | |
using (var pe = DBContextFactory.Instance.Create()) | |
{ | |
pe.Company.Add(company); | |
pe.SaveChanges(); | |
return company; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment