I have an form with following url: CreateEntity?officeCodeId=5
When I send form to validate and if validation is fail it returns just CreateEntity u
Your final answer is excellent and works great, although you can further enhance it to make it more generic by simply including Request.QueryString:
Then use the POST action:
[HttpPost]
protected virtual ActionResult CreateEntity(TEditViewModel model)
{
if (!ModelState.IsValid)
{
return View(model);
}