In my database, in one of the table I have a GUID column with allow nulls. I have a method with a Guid? parameter that inserts a new data row in the table. However when I s
or:
internal static T CastTo(object value) { return value != DBNull.Value ? (T)value : default(T); }