Note that there are some explanatory texts on larger screens.

plurals
  1. POError occured while updating field in database: An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module.in mvc
    primarykey
    data
    text
    <p>I have a table with columns checkbox,Document name,Field &amp; so on. In Field column I have displayed dropdown so as I change the values in dropdown it should be updated in table.I am passing DocumentId and crossponding fieldId (of row)through jquery to controller.<strong>But I get this error in Repository.cs file An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module.</strong></p> <p><strong>This is my Controller Code</strong></p> <pre><code> public ActionResult FieldSubmitted(long VendorId, int DocumentId, int FieldId) { SubmittedDocument submittedDocument = new SubmittedDocument(); var requestedDocument = _requestedDocumentService.GetVendorDocuments(VendorId).Where(t =&gt; t.DocumentID == DocumentId).FirstOrDefault(); if (requestedDocument != null) { submittedDocument = _submittedDocumentService.GetVendorDocuments(VendorId).Where(t =&gt; t.RequestedDocumentID == requestedDocument.RequestedDocumentID).FirstOrDefault(); submittedDocument.FieldId = FieldId; _submittedDocumentService.UpdateSubmittedDocument(submittedDocument); } return Json("", JsonRequestBehavior.AllowGet); } </code></pre> <p><strong>My Service</strong></p> <pre><code> public int UpdateSubmittedDocument(SubmittedDocument submittedDocument) { int a= _submittedDocumentRepository.Update(submittedDocument, submittedDocument.SubmittedDocumentID); return a; } </code></pre> <p><strong>Repository.cs</strong></p> <pre><code> public class Repository&lt;TObject&gt; : IRepository&lt;TObject&gt; public virtual void UpdateAuditedEntries(object obj) { if (CurrentUser == null) return; if (obj == null) return; var auditedEntity = obj as IAuditedEntity; if (auditedEntity != null) { auditedEntity.ModifiedBy = CurrentUser.UserId; auditedEntity.ModifiedDateTime = DateTime.Now; obj.GetType().GetProperties().ToList().ForEach(x =&gt; { var child = x.GetValue(obj); UpdateAuditedEntries(child); }); } else { var propertyCollection = obj as ICollection; if (propertyCollection != null) { foreach (object child in propertyCollection) { UpdateAuditedEntries(child); } } } } </code></pre> <p><strong>I am getting error at var child = x.GetValue(obj);</strong> this line <strong>An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module.</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload