public void Add(UploadedPicture picture) { using (var context = new PicturesDBDataContext(_connection)) { context.UploadedPictures.InsertOnSubmit(picture); context.SubmitChanges(); } }
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(); } }
private void detach_UploadedPictures(UploadedPicture entity) { this.SendPropertyChanging(); entity.User = null; }
partial void DeleteUploadedPicture(UploadedPicture instance);
partial void UpdateUploadedPicture(UploadedPicture instance);
partial void InsertUploadedPicture(UploadedPicture instance);