Example #1
0
        public static void Add(Craft craft)
        {
            if (_crafts.Any())
            {
                craft.OwnerID = _crafts.Max(c => c.OwnerID) + 1;
            }
            else
            {
                craft.OwnerID = 1;
            }

            _crafts.Add(craft);
        }
Example #2
0
 public static void Edit(Craft craft)
 {
     _crafts.RemoveAll(c => c.OwnerID == craft.OwnerID);
     _crafts.Add(craft);
 }