Skip to content

Instantly share code, notes, and snippets.

@codelinq
Created June 13, 2011 01:20
Show Gist options
  • Select an option

  • Save codelinq/1022192 to your computer and use it in GitHub Desktop.

Select an option

Save codelinq/1022192 to your computer and use it in GitHub Desktop.
Is this too much code in an action?
public ViewResult Search(Guid customerId)
{
SearchModel model = _menuTasks.GetDefaultSearchModelFor(_sessionData.UserId, customerId);
model.Results = _menuTasks.Search(model);
var customer = _customerTasks.GetCustomerInformationModelForCustomer(customerId);
ViewData["Menu"] = new PresentationMenuModel { BusinessName = customer.Name };
ViewData["hide-option-tab"] = true;
return View("Search", model);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment