public bool AddContentToDirectory(CarInContent content) { int startingCount = _contentDirectory.Count; _contentDirectory.Add(content); bool wasAdded = (_contentDirectory.Count > startingCount) ? true : false; return(wasAdded); }
public bool UpdateExistingContent(string originalLastName, CarInContent updatedContent) { CarInContent oldContent = GetContentByLastName(originalLastName); if (oldContent != null) { oldContent.Id = updatedContent.Id; oldContent.LastName = updatedContent.LastName; oldContent.Age = updatedContent.Age; oldContent.EnrollmentDate = updatedContent.EnrollmentDate; oldContent.TypeOfMembership = updatedContent.TypeOfMembership; return(true); } else { return(false); } }
public bool DeleteExistingContent(CarInContent carInContent) { bool deleteResult = _contentDirectory.Remove(carInContent); return(deleteResult); }