public static OrderComment ToProductModel(this product_comment val) { return(new OrderComment() { id = val.id, parentid = val.replyto, comment = val.comment.ToHtmlBreak(), creatorName = val.user.ToEmailName(true), dateCreated = val.created.ToLocalTime().ToString(GeneralConstants.DATEFORMAT_FULL), profileLink = val.user.GetProfilePhoto() }); }
public void AddComment(product_comment comment) { db.product_comments.InsertOnSubmit(comment); db.SubmitChanges(); }