コード例 #1
0
        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;
            }
        }
コード例 #2
0
 public void Insert(RoastType roastType)
 {
     roastTypeList.Add(roastType);
 }