I have a simple route like so:
some-domain.com/something/<some-guid>/somethingelse
Then my controller looks like:
public class SomeController : Controller
{
public ActionResult DoSomething(Guid someGuid, SomeModel someModel)
{...}
}
The routing config looks like:
/something/{someGuid}/somethingelse
Problem is if I send over a url with the guid in the right place it always seems to be an empty guid even though on the querystring is it perfectly fine. The only thing I can think of is that my SomeModel has a property called SomeGuid in this instance, which is empty.
So is mvc somehow taking the someGuid from the model and not the url or is there anything else to check? as I can debug and it hits the right controller from the route, and the url seems fine its just the url parameter seems to default to whatever is in the model.