Пример #1
0
 private static void InsertPerson(IPhoneBookRepository phoneBook)
 {
     phoneBook.Insert(new Person {
         FirstName = "John", LastName = "Smith", PhoneNumber = "(248) 123-4567", Address = "1234 Sand Hill Dr, Royal Oak, MI"
     });
     phoneBook.Insert(new Person
     {
         FirstName = "Cynthia", LastName = "Smith", PhoneNumber = "(824) 128-8758", Address = "875 Main St, Ann Arbor, MI"
     });
 }
        public List <Entry> SaveEntries(List <EditEntry> entries)
        {
            var models = MapCreateEntryToModel(entries);

            _phoneBookRepository.Insert(_context, models);

            //return the inserted models
            return(MapModelsToEntry(models));
        }