Modifying DataSourceResult in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Read([DataSourceRequest]DataSourceRequest, int item_id){ | |
DataSourceResult audits = logs.ToDataSourceResult(request, audit => new AuditDTO{ | |
id = audit.id | |
}); | |
System.Collections.IEnumerable items = audits.Data; | |
if (items != null){ | |
IEnumerator sEnum = items.GetEnumerator(); | |
while (sEnum.MoveNext()){ | |
AuditDTO key = (AuditDTO)sEnum.Current; | |
if (key != null){ | |
key.field_name = "blah"; | |
key.old_value = "blah"; | |
key.new_value = "blah"; | |
} | |
} | |
} | |
return Json(audits); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, I found this helpful.