quinta-feira, 18 de outubro de 2012

Entity Framework Json Serializer


Available at codeplex, a helper class to serialize EntityFramework entities with Asp.NET MVC JsonResult. This helper class solve the "Circular Reference" problem.
For more information: EFJson.

2 comentários:

  1. Hello, I've been testing your code. I found a podible improved following method to allow nullable values​​:
    public static bool IsSimpleObjectProperty (Type propertyType)
             {
                 return propertyType.IsPrimitive | | simpleObjectProperties.Contains (propertyType) | | (&& propertyType.IsGenericType propertyType.GetGenericTypeDefinition () == typeof (Nullable <>));
             }

    ResponderExcluir
    Respostas
    1. Thanks pepe, I put other types in Codeplex. I´ll put your code too.

      Excluir