/// <summary> /// Determines whether the specified wedding comment is spam. /// </summary> /// <param name="weddingComment">The wedding comment.</param> /// <returns></returns> public bool IsSpam(WeddingComment weddingComment) { foreach (string urlItem in urlPieces) { if (!String.IsNullOrEmpty(weddingComment.Comment) && weddingComment.Comment.ToLower().Contains(urlItem)) { return(true); } } return(false); }
///// <summary> ///// Update ///// </summary> ///// <param name="connectionInfo">The connection information.</param> ///// <param name="entity">The entity.</param> ///// <returns></returns> //public IProcessResult Update(IConnectionInfo connectionInfo, WeddingComment entity) //{ // return WeddingCommentManager.Current.Update(connectionInfo, entity); //} /// <summary> /// Update Async /// </summary> /// <param name="connectionInfo">The connection information.</param> /// <param name="entity">The entity.</param> /// <returns></returns> public async Task <IProcessResult> UpdateAsync(IConnectionInfo connectionInfo, WeddingComment entity) { return(await WeddingCommentManager.Current.UpdateAsync(connectionInfo, entity)); }
///// <summary> ///// Select ///// </summary> ///// <param name="connectionInfo">The connection information.</param> ///// <param name="filter">The filter.</param> ///// <returns></returns> //public List<WeddingComment> Select(IConnectionInfo connectionInfo, WeddingComment filter) //{ // return WeddingCommentManager.Current.Select(connectionInfo, filter); //} /// <summary> /// Select Async /// </summary> /// <param name="connectionInfo">The connection information.</param> /// <param name="filter">The filter.</param> /// <returns></returns> public async Task <List <WeddingComment> > SelectAsync(IConnectionInfo connectionInfo, WeddingComment filter) { return(await WeddingCommentManager.Current.SelectAsync(connectionInfo, filter)); }
///// <summary> ///// Update ///// </summary> ///// <param name="connectionInfo">The connection information.</param> ///// <param name="entity">The entity.</param> ///// <returns></returns> //public IProcessResult Update(IConnectionInfo connectionInfo, WeddingComment entity) //{ // return UpdateInternal(connectionInfo, entity).Result; //} /// <summary> /// Update Async. /// </summary> /// <param name="connectionInfo">The connection information.</param> /// <param name="entity">The entity.</param> /// <returns></returns> public async Task <IProcessResult> UpdateAsync(IConnectionInfo connectionInfo, WeddingComment entity) { return(await UpdateInternal(connectionInfo, entity)); }
///// <summary> ///// Select ///// </summary> ///// <param name="connectionInfo">The connection information.</param> ///// <param name="filter">The filter.</param> ///// <returns></returns> //public List<WeddingComment> Select(IConnectionInfo connectionInfo, WeddingComment filter) //{ // return SelectInternal(connectionInfo, filter).Result; //} /// <summary> /// Select Async /// </summary> /// <param name="connectionInfo">The connection information.</param> /// <param name="filter">The filter.</param> /// <returns></returns> public async Task <List <WeddingComment> > SelectAsync(IConnectionInfo connectionInfo, WeddingComment filter) { return(await SelectInternal(connectionInfo, filter)); }