Exemplo n.º 1
0
 public IActionResult postmessage(Message newmessage)
 {
     if (ModelState.IsValid)
     {
         userFactory.AddMessage((int)HttpContext.Session.GetInt32("id"), newmessage.message);
         return(RedirectToAction("wall"));
     }
     ViewBag.errors = ModelState.Values;
     return(View("wall"));
 }