public Drug Edit(Drug obj) { List <Drug> drugs = _stream.ReadAll().ToList(); drugs[drugs.FindIndex(dr => dr.Id == obj.Id)] = obj; _stream.SaveAll(drugs); return(obj); }
public Equipment GetEquip(Equipment equipment) { List <Equipment> equipments = _stream.ReadAll().ToList(); return(equipments[equipments.FindIndex(apt => apt.Name.Equals(equipment.Name))]); }