public JsonResult PostData(string message) { var data = new Data { Message = message, Date = DateTime.Now }; _db.Datas.InsertOnSubmit(data); _db.SubmitChanges(); // older data must be deleted // otherwise databae file will be full of records! DeleteOlderData(); return Json(true); }
partial void DeleteData(Data instance);
partial void UpdateData(Data instance);
partial void InsertData(Data instance);