public void SaveUser(User user) { this.user = user; UpdateDietPlan(); RunInBackground(() => { using (var repo = new BodyStateRepository()) { user.UpdateBodyState(repo.Add(user.BodyState)); } IsolatedStorage.WriteValue(Constants.CacheKeys.User, user); }); }
protected override void InitializeExecute() { base.InitializeExecute(); IsPhotoVisible = false; RunInBackground(() => { using (var repo = new BodyStateRepository()) { bodyStates = repo.GetListForProgress(20); selectedType = ViewModels.DiagramType.Weight; InvokeInUIThread(() => OnSelectedTypeChanged()); } }); }
public void OnDeserialized(System.Runtime.Serialization.StreamingContext context) { using (var stateRepo = new BodyStateRepository()) { bodyState = stateRepo.GetLastState(); } }