private void Delete() { DispatcherHelper.CheckBeginInvokeOnUI(() => { string message = ""; try { _floorRepo.Delete(SelectedFloorViewModel.FloorID); message = "删除成功!"; FloorViewModels.Remove(SelectedFloorViewModel); } catch (Exception ex) { Log.Error(ex); message = "删除失败!"; } Messenger.Default.Send(new NotificationMessage(message), Tokens.FloorPage_ShowNotification); }); }
public Task Delete(int id) { return(_floorRepository.Delete(id)); }