예제 #1
0
파일: Master.cs 프로젝트: gotenkusu48/tt
 public void InsertNew()
 {
     using (var conn = ConnectionProvider.GetConnection())
     {
         var p = new Person { Name = "�V�K" };
         conn.Insert(p);
         this.People.Insert(0, p);
     }
 }
예제 #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;
                        }
                    });
        }