public bool AddComment(int PhotoID, string Author, string TextComment) { try { if (PhotoID == 0 || Author == null || TextComment == null) { return(false); } Comment comment = new Comment { PhotoID = PhotoID, Author = Author, TextComment = TextComment }; return(_commentDao.AddComment(comment)); } catch (Exception ex) { MyLogger.AddLog(ex.Message, ex.StackTrace); Logger.Log.Error(ex.Message); return(false); } }
public void AddComment(Comment comment) { _commentDao.AddComment(comment); }
public int AddComment(Comment comment) { return(_commentDao.AddComment(comment)); }