/// <summary> /// Allow User to delete the Car Entry corresponding to Car the ID. /// </summary> /// <param name="carid">Saves Carid entry</param> public static int Delete(int carid, List <Cars> fileContents, CarData carRespo) { int result; { result = fileContents.RemoveAll(c => c.ID == carid); carRespo.SaveCSV(fileContents); } return(result); }
public static void AddCarInfo(Cars carToSave, List <Cars> fileContents, CarData carRespo) { fileContents.Add(carToSave); carRespo.SaveCSV(fileContents); }