using System.Collections.Generic; namespace Bücherwurm { class Lend_Administration { private List Lendings {get; set;} private List ActiveLendings {get; set;} private int NextId {get; set;} public Lend_Administration() { Lendings = new List(); ActiveLendings = new List(); NextId = 1; } public void Lend(int[] ItemIds, string Customer) { Lendings.Add(new Lending(NextId, ItemIds, Customer)); ActiveLendings.Add(NextId); NextId = NextId + 1; } public void Return(int LendID) { ActiveLendings.RemoveAll(id => id == LendID); } public List GetAllLendings() { return Lendings; } public List GetActiveLendings() { return Lendings.FindAll(lend => ActiveLendings.Contains(lend.LendId)); } } }