public Boolean deleteComments(Comment oldComment) { try { this.DataContext.Comments.DeleteOnSubmit(oldComment); this.DataContext.SubmitChanges(); return true; } catch (Exception) /*FIXME*/ { return false; } }
public Boolean editComments(String oldEvent, String oldUser, Comment newComment) { try { Comment editableComment = this.DataContext.Comments.Single(c => (c.Event == oldEvent) && (c.User == oldUser)); editableComment.Event = newComment.Event; editableComment.User = newComment.User; editableComment.Photo = newComment.Photo; editableComment.Commentaire = newComment.Commentaire; this.DataContext.SubmitChanges(); return true; } catch (Exception) /*FIXME*/ { return false; } }
public Boolean insertComments(Comment newComment) { try { this.DataContext.Comments.InsertOnSubmit(newComment); this.DataContext.SubmitChanges(); return true; } catch (Exception) /*FIXME*/ { return false; } }
private void detach_Comments(Comment entity) { this.SendPropertyChanging(); entity.User1 = null; }
private void attach_Comments(Comment entity) { this.SendPropertyChanging(); entity.User1 = this; }
partial void DeleteComment(Comment instance);
partial void UpdateComment(Comment instance);
partial void InsertComment(Comment instance);