private async void OnSave() { var editingSLStandardDescription = Mapper.Map <EditableSLStandardDescription, SLStandardDescription>(SLStandardDescription); try { if (EditMode) { await _sLStandardDescriptionsService.UpdateSLStandardDescriptionAsync(editingSLStandardDescription); } else { await _sLStandardDescriptionsService.AddSLStandardDescriptionAsync(editingSLStandardDescription); } Done?.Invoke(); } catch (Exception ex) { Failed?.Invoke(ex); } finally { SLStandardDescription = null; } }
public void SetSLStandardDescription(SLStandardDescription sLStandardDescription) { SLStandardDescription = Mapper.Map <SLStandardDescription, EditableSLStandardDescription>(sLStandardDescription); SLStandardDescription.ErrorsChanged += RaiseCanExecuteChanged; }