Skip to content

Instantly share code, notes, and snippets.

@christopherbauer
Created August 25, 2015 02:52
Show Gist options
  • Select an option

  • Save christopherbauer/64a09a4bb72c477026f8 to your computer and use it in GitHub Desktop.

Select an option

Save christopherbauer/64a09a4bb72c477026f8 to your computer and use it in GitHub Desktop.
public class DataTableResult
{
/// <summary>
/// Response to the draw from DataTablesParameters, always cast the parameter value to int before returning it to prevent XSS
/// </summary>
public int draw { get; set; }
/// <summary>
/// Total records prior to filtering (in DB)
/// </summary>
public int recordsTotal { get; set; }
/// <summary>
/// Total records after filtering (not just the number returned from this page of data)
/// </summary>
public int recordsFiltered { get; set; }
/// <summary>
/// Data to display in table
/// </summary>
public object[] data { get; set; }
/// <summary>
/// Optional, in the event an error was detected but was found to be recoverable
/// </summary>
public string error { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment