partial void DeleteFeedback(Feedback instance);
partial void InsertFeedback(Feedback instance);
partial void UpdateFeedback(Feedback instance);
public JsonResult NewFeedback() { var form = Request.Form; string name = form["name"], message = form["message"]; if (name.IsEmpty() || message.IsEmpty()) return Json(false); var feedback = new Feedback { Name = name.GetValidatedString(), Message = message.GetValidatedString(), Date = DateTime.Now }; _db.Feedbacks.InsertOnSubmit(feedback); _db.SubmitChanges(); return Json(new { name = feedback.Name, message = feedback.Message.ResolveLinks(), time = feedback.Date.ToAgo(DateTime.Now) }); }