public static PersonViewModel CreateViewModel(Person original)
    {
        var func = FromPerson.Compile();
        var vm   = func(original);

        return(vm);
    }
Example #2
0
        public void Update(Action postUpdateCallback)
        {
            if (!obj.Has("fromPerson"))
            {
                obj.Put("fromPerson", FromPerson.ToParse());
            }
            if (!obj.Has("who"))
            {
                obj.Put("who", Who.ToParse());
            }

            try {
                obj.Save();
                postUpdateCallback();
            } catch {
                obj.SaveEventually(new TabSaveCallback(e => postUpdateCallback()));
            }
        }