bool IsSimpleType(Type t)
{
if (t.IsGenericType && t.GetGenericTypeDefinition().Equals(typeof(Nullable<>)))
{
t = Nullable.GetUnderlyingType(t);
}
return t.IsPrimitive
|| t == typeof(DateTime)
|| t == typeof(decimal)
|| t == typeof(string)
|| t == typeof(Guid);
}