// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
- public ActionResult Create([Bind(Include = "id,user_id,name,description,created_at,updated_at")] Project project)
+ public ActionResult Create([Bind(Include = "id,user_id,name,description")] Project project)
{
if (ModelState.IsValid)
{
+ project.created_at = DateTime.Now;
+ project.updated_at = DateTime.Now;
db.Projects.Add(project);
db.SaveChanges();
return RedirectToAction("Index");
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
- public ActionResult Edit([Bind(Include = "id,user_id,name,description,created_at,updated_at")] Project project)
+ public ActionResult Edit([Bind(Include = "id,user_id,name,description,created_at")] Project project)
{
if (ModelState.IsValid)
{
+ project.updated_at = DateTime.Now;
db.Entry(project).State = EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");