Exemple #1
0
 public void Add(UploadedPicture picture)
 {
     using (var context = new PicturesDBDataContext(_connection))
     {
         context.UploadedPictures.InsertOnSubmit(picture);
         context.SubmitChanges();
     }
 }
Exemple #2
0
 public void TimesSeen(int id)
 {
     using (var context = new PicturesDBDataContext(_connection))
     {
         UploadedPicture image = context.UploadedPictures.FirstOrDefault(i => i.id == id);
         image.TimesSeen = image.TimesSeen + 1;
         context.SubmitChanges();
     }
 }