using (MyDBContext context = new MyDBContext()) { Student s = new Student(); s.Name = "ABCD"; s.DOB = DateTime.Today; context.Students.Add(s); // throws the run-time exception context.SaveChanges(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)