public void AddPlace(string name, params string[] tags) { var id = Places.Any() ? Places.Max(x => x.Id) + 1 : 0; var place = new Place(id, name, tags); Places.Add(place); }
public void AddPlace(Place place) { var id = Places.Any() ? Places.Max(x => x.Id) + 1 : 0; place.Id = id; Places.Add(place); }