private void mnuEditDelete_Click(object sender, EventArgs e) { Nullable <Guid> selectedId = UIHelper.GetSelectedRowId( grdCustomers, EntityReader <Customer> .GetPropertyName(p => p.CustomerId, true), true); Customer customer = _customerCache[selectedId.Value]; if (UIHelper.AskQuestion( "Deleting a customer will delete all the data associated with this customer. Are you sure you want to delete the selected customer?") != DialogResult.Yes) { return; } _customerCache.Delete(selectedId.Value); Refresh(false); _unsavedChanges = true; }