Exemple #1
0
 public void InsertNew()
 {
     using (var conn = ConnectionProvider.GetConnection())
     {
         var p = new Person { Name = "�V�K" };
         conn.Insert(p);
         this.People.Insert(0, p);
     }
 }
Exemple #2
0
        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;
                        }
                    });
        }