मेरा सवाल इस समस्या का हिस्सा है:
मैं एक फॉर्म से आईडी का संग्रह प्राप्त करता हूं। मुझे चाबियाँ प्राप्त करने की आवश्यकता है, उन्हें पूर्णांक में परिवर्तित करें और डीबी से मिलान रिकॉर्ड का चयन करें।
[HttpPost]
public ActionResult Report(FormCollection collection)
{
var listofIDs = collection.AllKeys.ToList();
// List<string> to List<int>
List<Dinner> dinners = new List<Dinner>();
dinners= repository.GetDinners(listofIDs);
return View(dinners);
}