public void InsertNew() { using (var conn = ConnectionProvider.GetConnection()) { var p = new Person { Name = "�V�K" }; conn.Insert(p); this.People.Insert(0, p); } }
public PersonViewModel(Person person) { this.Person = person; this.Name = this.Person.ToReactivePropertyAsSynchronized(x => x.Name); this.Age = this.Person.ToReactivePropertyAsSynchronized(x => x.Age, convert: x => x.ToString(), convertBack: x => { try { return int.Parse(x); } catch { return 0; } }); }