public PlantListItem(Plant plant) { this.plant = plant; }
public void SaveNewPlant(Plant plant, CapturedPicture picture) { CreatePlantDataContextIfNotExists(); StorablePlant storablePlant = new StorablePlant(plant, picture != null ? picture.FileName : null); PlantDataContext.Plants.InsertOnSubmit(storablePlant); PlantDataContext.SubmitChanges(); Plants.Add(plant); if (picture != null) PictureRepository.Instance.SavePicture(picture); }