private void DeleteColor(Material material) { var colors = CommonClientFunctions.ReadColorsByMaterialId(material.Id); var hasElements = CommonClientFunctions.EntitySelection(colors, out Color color, 1); if (!hasElements) { Console.WriteLine("No Colors Available"); return; } if (color is null) { return; } using (var db = new ShopContext()) { new DataService(db).Delete(color); } }