public Rabbit SellRabbit(string name) { Rabbit rabbit = data.FirstOrDefault(r => r.Name == name); if (rabbit != null) { rabbit.Available = false; } return(rabbit); }
public bool RemoveRabbit(string name) { Rabbit rabbit = data.FirstOrDefault(r => r.Name == name); if (rabbit != null) { data.Remove(rabbit); return(true); } return(false); }