I'm working on an MVC vb.net app and I'm trying to do my first CRUD implementation. I've got the List and details pieces working fine but Edit is giving me some trouble. I'm working from the tutorial here
but it's in C# and i'm trying to convert it to VB.NET
Anyway, when I click the Edit link in my list view, it brings up the correct record and the correct information in the fields, but when I change it and click save I get oops.
Function Edit(ByVal id As Integer, ByVal collection As FormCollection) As ActionResult
' TODO: Add update logic here
Dim v As People_t = db.People_ts.Single(Function(vh) vh.People_ID = id)
v.LastName = Integer.Parse(collection("LastName"))
v.FirstName = Integer.Parse(collection("FirstName"))
v.Discipline_ID = Integer.Parse(collection("Discipline_ID"))
Any ideas where I've gone wrong?