I have a new business rule in my project.
I need a details view, so I have a small form to save only two information: Delay and No Uniform.
I already have the table made. But I needed this form to save only those two information, not the entire object, because it is already loaded on the detail page.
How can I make a action that only save this information?
What I already have is this:
public ActionResult Controle([Bind(Include = "AlunoID,Atrasos,SemUniforme")] Aluno aluno)
{
if (ModelState.IsValid)
{
db.Alunos.Add(aluno);
db.SaveChanges();
}
return View(aluno);
}
But I do not know if it's right ... That's why I have not even done form
.
Could anyone help me?