public int Insert(PersonDto person) { var newId = MockDb.MockDb.Persons.Max(r => r.Id) + 1; var newItem = new MockDb.PersonData { Id = newId, FirstName = person.FirstName, LastName = person.LastName }; MockDb.MockDb.Persons.Add(newItem); return newId; }
public int Insert(string firstName, string lastName) { var newId = MockDb.MockDb.Persons.Max(r => r.Id) + 1; var item = new MockDb.PersonData { Id = newId, FirstName = firstName, LastName = lastName }; MockDb.MockDb.Persons.Add(item); return(newId); }