private void CreateLunch(LunchTimeDto lunch, IList<Person> people) { var entity = new LunchTime() { People = people, DayOfWeek = lunch.DayOfWeek, }; db.LunchTimes.Add(entity); db.SaveChanges(); }
private IList<Person> Attach(LunchTimeDto lunch, DataContext db) { return Attach(lunch.People, db); }