Ok im trying to get a MVC example page working and basically query where a certain id is specified but i'm fairly new to it all and after an hour of trying to figure this out im hoping of you can help me!!
code below is a method from my taskController.cs that is called via /tasks/complete/2
//mark task as complete
public ActionResult Complete(int id)
{
IEnumerable<task> tasks = from t in db.tasks where t.taskID = id select t;
foreach (task myTask in tasks)
{
myTask.isComplete = true;
}
db.SubmitChanges();
return RedirectToAction("Index");
}