コード例 #1
0
 public void AddLandScape(LandScape landscape)
 {
     using (PhotoContainer ctx = new PhotoContainer())
     {
         ctx.LandScapeSet.Add(landscape);
         ctx.SaveChanges();
     }
 }
コード例 #2
0
ファイル: LandScapeForm.cs プロジェクト: TudorT98/MyPhotos
        private void SaveButton_Click(object sender, EventArgs e)
        {
            landscape = new LandScape(LandScapeNameValue.Text, LandScapeDescriptionValue.Text);
            MyPhotosClient myPhotoClient = new MyPhotosClient();

            myPhotoClient.AddLandScape(landscape);
            Clear();
        }
コード例 #3
0
 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;
 }