public void AddLandScape(LandScape landscape) { using (PhotoContainer ctx = new PhotoContainer()) { ctx.LandScapeSet.Add(landscape); ctx.SaveChanges(); } }
private void SaveButton_Click(object sender, EventArgs e) { landscape = new LandScape(LandScapeNameValue.Text, LandScapeDescriptionValue.Text); MyPhotosClient myPhotoClient = new MyPhotosClient(); myPhotoClient.AddLandScape(landscape); Clear(); }
public Photo(string fullPath, string isMovie, string isRemoved, Location location, LandScape landScape, Event @event, Person person) { FullPath = fullPath; this.isMovie = isMovie; this.isRemoved = isRemoved; Location = location; LandScape = landScape; Event = @event; Person = person; }