public void InsertSiteComments(Models.Site.CommentsPostViewModel model, string userId) { var item = new Catalog_Product_Comments { Created = DateTime.Now, Description = model.Description, ProductId = model.ProductId, Rating = model.Rating, Status = 0, UserId = userId, UserTitle = Layers.CustomerLayer.Customer.Title }; m_ContentContext.Catalog_Product_Comments.Add(item); m_ContentContext.SaveChanges(); }
public ActionResult AddComment(Models.Site.CommentsPostViewModel model) { m_catalogWorker.InsertSiteComments(model, User.Identity.GetUserId()); return(Content("Ok")); }