Following error occurred when trying to convert entity object into JSON String. I\'m using C# MVC4 with code first DB designing. It seams its because FKs and relationships b
it is trying to load child objects and it may be creating some circular loop property that will never end.
also you use [ScriptIgnore] , will not serialize the public property or public field look at this :
public class BookingHotel : IntBaseEntity
{
public string BookingName { get; set; }
public string BookingReference { get; set; }
public DateTime? CheckInDate { get; set; }
public DateTime? CheckOutDate { get; set; }
public int HotelId { get; set; }
[ScriptIgnore]
public Hotel Hotel { get; set; }
}