public static DbMetaType FromValueType(Type t) { if (t is null) { throw new ArgumentNullException(nameof(t)); } return(new DbMetaType() { AssemblyQualifiedName = t.AssemblyQualifiedName, FullName = t.FullName, IsArray = t.IsArray, Default = t.GetDefaultValue().ToString(), IsEnum = t.IsEnum, IsNumeric = t.IsNumericType(), Name = t.Name, Namespace = t.Namespace, Values = MetaType.GetEnumValues(t) }); }