The ObjectContext instance has been disposed and can no longer be used for operations that require a connection. RRS feed

  • Question


    I have following error while using entity framework

    VehicleAdSummaryModel m = new VehicleAdSummaryModel(); m.Id = ad.Id; m.ImageUrl = ad.Images.FirstOrDefault().Url; m.ModelDetails =Convert.ToString( ad.Model.Name); m.Make =Convert.ToString( ad.ModelYear);

    Monday, December 5, 2016 7:34 PM

All replies

  • Hi,

    Thank you for posting here!

    Cloud you please provide few more details about the query and error message which you are trying, check the stack trace for the complete error message and root cause of the issue.

    When are you getting the error message? In case if you are getting the error message while converting to string then please refer the SO thread and let us know if that helps.




    Tuesday, December 6, 2016 8:17 AM