private void DeleteMaterialCount(SizeOption option) { var materialCounts = CommonClientFunctions.ReadMaterialCountsBySizeOptionId(option.Id); var hasElements = CommonClientFunctions.EntitySelection(materialCounts, out MaterialCount materialCount, 1); if (!hasElements) { Console.WriteLine("No Material Counts Available"); return; } if (materialCount is null) { return; } using (var db = new ShopContext()) { new DataService(db).Delete(materialCount); } }