I have a column with SQL type of smallint (EF type of Int16) that I want to insert a null value into but when I use the below code I get the error that null can not be converted to short. How can I get this one line if statment to allow me to insert a null?
CollectionID = (ddlCollection.SelectedValue == "None") ? null : Convert.ToInt16(ddlCollection.SelectedValue)