Skip to content

Instantly share code, notes, and snippets.

@johnmmoss
Created March 31, 2015 07:08
Show Gist options
  • Save johnmmoss/850efa4b32c3b9782d5c to your computer and use it in GitHub Desktop.
Save johnmmoss/850efa4b32c3b9782d5c to your computer and use it in GitHub Desktop.
Enitity Framework 6 Setting up Data
context.Departments.Add(new Department() { Id = 1, Name = "Department 1" });
context.Departments.Add(new Department() { Id = 2, Name = "Department 2" });
context.Employees.Add(new Employee() { Id = 1, ForeName = "John" });
context.Employees.Add(new Employee() { Id = 2, ForeName = "Mark" });
context.Employees.Add(new Employee() { Id = 3, ForeName = "Mat" });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment