public Person(DataModel.Person data) { Data = data; Id = data.Id; Title = data.Name; IconName = "appbar_people"; PeopleGroupId = data.PeopleGroupId; }
public Person CreatePerson(string name, PeopleGroup peopleGroup) { var dmPerson = new DataModel.Person { Id = ACore.Db.GetNextIdFor<DataModel.Person>(), Name = name, PeopleGroupId = peopleGroup?.Id }; ACore.Db.Insert(dmPerson); var vmPerson = new Person(dmPerson); AllPeople.Add(vmPerson); SetInPalce(vmPerson, true); return vmPerson; }