Here is my model:
public class Product : Entity
{
public virtual string Name { get; set; }
}
public class Prospect : Entity
{
public virtual string Sex { get; set; }
public virtual string Initials { get; set; }
public virtual string LastName { get; set; }
public virtual int HouseNo { get; set; }
public virtual Product Product { get; set; }
}
As you can see, its a simple one.
When using the JS Serializer on it:
var serialize = (new JavaScriptSerializer()).Serialize(list);
it brakes with "A circular reference was detected while serializing an
object of type "System.Reflection.Module""
As soon as I slim down my model to exclude "Product" entity from being
mapped (so that its a normal child entity), it works ok.
The best thing I can conclude is that its because of Castle's proxy's.
Did anyone tackle this problem? I've seen solutions for JSON.Net, but
as the application on which I am working is working with built in MS
MVC action results (one of them being Json action result)...it
automatically uses that for serialization.
Any ideas?
Vladan
btw. thnx for your answer! :)
Vladan
On 28 sij, 15:42, "allan.ritc...@gmail.com" <allan.ritc...@gmail.com>
wrote:
thanks anyway! :)
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
As soon as I find a working solution it will be posted here...thanks
for reminding me Fabio! :)
allan.ritchie...would it be possible to see your solution? maybe it
will save me some pain?
Vladan
On 29 sij, 13:30, Fabio Maulo <fabioma...@gmail.com> wrote:
> would be nice if you send the solution here... (as a courtesy before your
> next support request).
>
> 2010/1/29 Vladan Strigo <vladan.str...@gmail.com>
> > nhusers+u...@googlegroups.com<nhusers%2Bunsu...@googlegroups.com>