public async void Save() { using (ActiveDetail.Busy.GetTicket()) await ActiveUnitOfWork.CommitAsync(); ActiveDetail.Start(ActiveStaffingResource.Id, EditMode.View); }
public async void Delete() { await _dialogManager.ShowMessageAsync( string.Format("Are you sure you want to delete {0}?", ActiveStaffingResource.FullName), DialogResult.Yes, DialogResult.No, DialogButtons.YesNo); try { using (ActiveDetail.Busy.GetTicket()) { ActiveUnitOfWork.StaffingResources.Delete(ActiveStaffingResource); await ActiveUnitOfWork.CommitAsync(); } ActiveItem.TryClose(); } catch (TaskCanceledException) { ActiveUnitOfWork.Rollback(); } catch (Exception) { ActiveUnitOfWork.Rollback(); throw; } }