public void Update(RoastType roastType) { // Use the ID of roastType to map and update RoastType itemToUpdate = roastTypeList.FirstOrDefault(x => x.ID == roastType.ID); if (itemToUpdate != null) { itemToUpdate.Name = roastType.Name; itemToUpdate.RoastPercentage = roastType.RoastPercentage; } }
public void Insert(RoastType roastType) { roastTypeList.Add(roastType); }