public static T DbCast(Object value) { if (value is System.DBNull) return default(T); return (T) value; }