public void BizAction(int inputData) { var item = _updateDbAccess.GetCup(inputData); if (item == null) { AddError("Could not find the cup.Someone entering illegal ids?"); } if (!HasErrors) { _dbAccess.Delete(item); Message = $"Cup is Delete: {item.ToString()}."; } }
public void BizAction(CupDto inputData) { var project = _dbAccess.GetCup(inputData.Id); if (project == null) { AddError("Could not find the cup.Someone entering illegal ids?"); return; } var status = project.UpdateCup(inputData.Width, inputData.Height); CombineErrors(status); Message = $"cup is update: {project.ToString()}."; }