Skip to content

Instantly share code, notes, and snippets.

@shassaan
Created November 3, 2020 12:49
Show Gist options
  • Save shassaan/44c79cf9723d1661bd7c44520bb96025 to your computer and use it in GitHub Desktop.
Save shassaan/44c79cf9723d1661bd7c44520bb96025 to your computer and use it in GitHub Desktop.
ContextConsumer
using (var ctx = new SchoolContext())
{
var stud = new Student()
{
StudentName = "Bill"
};
ctx.Students.Add(stud);
ctx.SaveChanges();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment