I got a table in sql-server 2012 with a column that is the datatype int but also nullable.
I've a textbox that when left empty should insert NULL into the nullable int cell. But I'm having trouble with what type to send in to be translated as null. What I want is a datatype of int but also null (int?) to send into the database.
var tbl_row = db.table.Where(n => n.key.Equals(key)).SingleOrDefault();
tbl_row.nullable_int = this.tb.Text == "" ? [null int value] : int.Parse(this.tb.Text);