if you use entity framework and you want to make the only int acceptable then you can use this in linq query you can try this
var items = from c in contacts
select new ListItem
{
Value = (int)ContractId
Text = c.Name
};
it will work because using (int) will cast your value to the int so you don't need any conversion for string to int and you get the result you want.
this worked for me in my project i think it would be helpful for you