public void UpdateSession(SessionDto session)
 {
     throw new NotImplementedException();
 }
 public async Task UpdateSessionAsync(SessionDto session)
 {
     await httpClient.PutAsJsonAsync("sessions/list", session);
 }
 public SessionDto AddSession(SessionDto session)
 {
     throw new NotImplementedException();
 }
        public async Task<SessionDto> AddSessionAsync(SessionDto session)
        {
            var response = await httpClient.PostAsJsonAsync("sessions/list", session);
            var result = await response.Content.ReadAsAsync<SessionDto>();

            return result;
        }
 private void ExecuteAddCommand(object parameter)
 {
     var session = new SessionDto();
     session.TrackIds = new ObservableCollection<int>();
     _editView.AddNewItem(session);
     this.SetCurrentSession(session);
     this.RefreshCommands();
     this.CurrentState = EDIT_STATE;
 }
 private void SetCurrentSession(SessionDto session)
 {
     if (session != null)
     {
         this.CurrentSession = session;
         _uiTrackList.ForEach(t => t.IsChecked = false);
         if (session.TrackIds == null)
             session.TrackIds = new ObservableCollection<int>();
         foreach (var id in session.TrackIds)
         {
             foreach (var uitrack in _uiTrackList)
             {
                 if (uitrack.Track.Id == id)
                 {
                     _isChanging = true;
                     uitrack.IsChecked = true;
                     _isChanging = false;
                 }
             }
         }
         this.CurrentSession.PropertyChanged += this.OnSessionPropertyChanged;
         _hasChanges = false;
     }
 }
 public async Task UpdateSessionAsync(SessionDto session)
 {
     await httpClient.PutAsJsonAsync("sessions/list", session);
 }
 public void UpdateSession(SessionDto session)
 {
     throw new NotImplementedException();
 }
 public SessionDto AddSession(SessionDto session)
 {
     throw new NotImplementedException();
 }