jaduff / LabLog

Software for recording physical users of computers in a lab environment.
MIT License
0 stars 1 forks source link

Assign student #43

Closed jaduff closed 6 years ago

jaduff commented 6 years ago

I've got the Write Model tests and logic working. And the Read Model tests and logic working. But trying to integrate it with the controllers, views, viewmodels, etc is baffling me.

I need a form which contains a list of computers (or at least serial numbers) and users (or at least usernames) to assign to them. I've started, but I'm not at all sure how to proceed.

jaduff commented 6 years ago

I'm not getting any data returned from the form. This talks about it, but doesn't seem to have a solution - Link This implies there's a solution, but it doesn't go into a lot of detail, and its from an older version - Link

Any suggestions?

jaduff commented 6 years ago

Ok, its working now. Can you please check the PR and let me know if there's anything I need to change.

jaduff commented 6 years ago

I've updated the admin controller, but now my Room.cshtml form says "AmbiguousActionException: Multiple actions matched". It's matching the same route on the admin and teacher controllers, even though the form has <form asp-controller="@this.ViewContext.RouteData.Values["controller"].ToString()" to match the controller that generated the view in the first place. Any ideas?

simonjduff commented 6 years ago

Put a breakpoint on that tag to make sure routedata controller has a value

jaduff commented 6 years ago

Heh, whoooops! Its not the view that's the problem. I copied the route from one controller to the other. So the route attribute is identical in both controllers!