Resolving Table Parameter Unspecified Issue

Jan 28th, 2014
HelloWorld
Category:
Programming
Price: $30 USD

Question description

Hi, I am fairly close to finishing a task but I have a slight issue regarding table parameters being unspecified in my code. I am creating a web application that using a database.


This action in the controller aims to filter the results by the persons hair colour.


  /// POST: /Person/Search
  [HttpPost]
  public ActionResult Search(PersonSearchViewModel viewModel)
  {
  viewModel.HairColourViewModel = new HairColourViewModel
  {
  HairColours = new SelectList(this.hairColourManager.GetHairColours(), "HairColour"),
 
  };

  if (!this.ModelState.IsValid)
  {
  return this.View(viewModel);
  }

  viewModel.SearchResult = this.personManager.FindPeople(viewModel.SearchCriteria, 1234);

  return this.View(viewModel);
  }



The procedure (database):

create procedure akk.GetPersonalDetails
  @Age int  = null,
  @Birthdate  date  = null,
  @HairColourCategory akk.IdTableType readonly  -- Optional list of Person ids to filter by. Passing none will be treated as if all were passed.


The table (database):

create type akk.IdTableType as table
(
  Category int
)


All steps work up until here work, but when I try to search for the person by their hair colour, I get the error "Table parameter is unspecified" .

If you could tell me what this means I would be very grateful.

Thankyou








Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Cornell University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
Five Star Tutor
Dec 4th, 2016
" Outstanding Job!!!! "
kpcutie
Nov 20th, 2016
" Excellent job "
Joemoe
Nov 11th, 2016
" <3 it, thanks for saving me time. "
Hemapathy
Nov 7th, 2016
" all I can say is wow very fast work, great work thanks "
pmallory
Oct 29th, 2016
" Totally impressed with results!! :-) "
kevin12622
Oct 15th, 2016
" Goes above and beyond expectations ! "
kiln82
Oct 6th, 2016
" awesome work thanks "
likeplum4
Sep 23rd, 2016
" Excellent work as usual "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1825 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors