Hi
I am working with checkboxes in MVC.I have a table with one clolumn as "bit" type.The following code giving me error
Code
[HttpPost]Code
public string Index(IEnumerable cities)Code
{Code
if (cities.Count(x => x.Chosen) == 0)Code
{Code
return "You did not select any city";Code
}Chosen is a bit type here. and when i am trying to build it says "
Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?)

Ajay MalikRank #752 · 3.1K reputationPosted Aug 23, 2016, 8:08 PM EDT
Manas MohapatraRank #182 · 13.2K reputationPosted Aug 23, 2016, 11:35 PM EDT
Vinay SinghRank #604 · 4K reputationPosted Aug 24, 2016, 12:57 AM EDT