var myquote = new ModQuote { UserId = WebSecurity.GetUserId(user), PostId = model.PostId, Comment = model.Comment, ReplyId = model.ReplyId, ProfileId = model.ProfileId, By = User.Identity.Name, File = model.File }; //var last = db.MyModQuote.Where(a => a.PostId == id).AsEnumerable().LastOrDefault(); //if (last != null) //{ // var find = db.Posts.Find(last.PostId); //} db.MyModQuote.Add(myquote); db.SaveChanges(); return RedirectToAction("topics", new { id = id }); } return View(model);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)