Skip to content

Commit

Permalink
avoid adding modelPersons with same Id in Sample project
Browse files Browse the repository at this point in the history
  • Loading branch information
yellis committed Jun 11, 2014
1 parent a2b2cb2 commit 2aed60c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sample.Mvc/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public ActionResult EfModelFirst()

using (MiniProfiler.Current.Step("Insertion"))
{
var p = new ModelPerson { Name = "sam" };
var p = new ModelPerson { Name = "sam", Id = new Random().Next(10000)};
context.ModelPersons.Add(p);
context.SaveChanges();
}
Expand Down

0 comments on commit 2aed60c

Please sign in to comment.