public static string DefaultValue(this IEntity entity) { var typedEntity = (ITypedEntity)entity; if (TypeSystemServices.IsReferenceType(typedEntity.Type)) { return("null"); } switch (typedEntity.Type.FullName) { case "double": case "float": return("0.0f"); case "int": case "long": case "byte": return("0"); case "char": return("'\0'"); case "boolean": return("false"); } return($"default({typedEntity.Type.Name})"); }