DataTableExtensions Class
.NET Standard 2.x
For DataTable, imports or exports data in XML/Json format.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Syntax
public static class DataTableExtensions;
Extension Methods
Name | Returns Type | Description |
---|---|---|
AddDataTable([NotNull]this IDataPacker packer,[NotNull]string key,[NotNull]DataTable value) | void | Adds a DataTable object as an element to the IDataPacker object. |
AddDataTable([NotNull]this IDataPacker packer,[NotNull]string key,[NotNull]DataTable value,[NotNull]bool changedOnly) | void | Adds a DataTable object as an element to the IDataPacker object, and specifies whether to export only the changed data from the DataTable object. |
GetDataTable([NotNull]this IDataPacker dataPacker,[NotNull]string key) | DataTable | Gets the DataTable object created by the specified element. |
GetDataTable([NotNull]this IDataUnpacker dataUnPackage,[NotNull]string key) | DataTable | Gets the DataTable object created by the specified element. |
ExportJson(this DataTable dataTable) | string | Exports data from the DataTable to a Plain JSON string. |
ExportJson(this DataTable dataTable, bool changedOnly) | string | Exports all rows or only the changed rows from the DataTable to a Plain JSON string. |
ExportJson(this DataTable dataTable, int startRow) | string | Exports data from the DataTable to a Plain JSON string, and specifies the starting position of the rows. |
ExportJson(this DataTable dataTable, int startRow, int endRow) | string | Exports data from the DataTable to a Plain JSON string, and specifies the start and end positions of the rows. |
ExportJson(this DataTable dataTable, int startRow, int endRow, short startColumn) | string | Exports data from the DataTable to a Plain JSON string, and specifies the start and end positions of the rows and starting position of the column. |
ExportJson(this DataTable dataTable, int startRow, int endRow, short startColumn, short endColumn) | string | Exports data from the DataTable to a Plain JSON string, and specifies the start and end positions of the rows and columns. |
ExportXml(this DataTable dataTable) | string | Exports data from the DataTable to a Plain Xml string. |
ExportXml(this DataTable dataTable, bool changedOnly) | string | Exports all rows or only the changed rows from the DataTable to a Plain Xml string. |
ExportXml(this DataTable dataTable, int startRow) | string | Exports data from the DataTable to a Plain Xml string, and specifies the starting position of the rows. |
ExportXml(this DataTable dataTable, int startRow, int endRow) | string | Exports data from the DataTable to a Plain Xml string, and specifies the start and end positions of the rows. |
ExportXml(this DataTable dataTable, int startRow, int endRow, short startColumn) | string | Exports data from the DataTable to a Plain Xml string, and specifies the start and end positions of the rows and starting position of the column. |
ExportXml(this DataTable dataTable, int startRow, int endRow, short startColumn, short endColumn) | string | Exports data from the DataTable to a Plain Xml string, and specifies the start and end positions of the rows and columns. |
ImportJson(this DataTable dataTable, string json) | int | Imports data from a JSON string into the DataTable. |
ImportJson(this DataTable dataTable, string json, int startRow) | int | Imports data from a JSON string into the DataTable, and specifies the starting position of the rows. |
ImportJson(this DataTable dataTable, string json, int startRow, int endRow) | int | Imports data from a JSON string into the DataTable, and specifies the start and end positions of the rows. |
ImportJson(this DataTable dataTable, string json, int startRow, int endRow, short startProperty) | int | Imports data from a JSON string into the DataTable, and specifies the start and end positions of the rows and starting position of the property. |
ImportJson(this DataTable dataTable, string json, int startRow, int endRow, short startProperty, short endProperty) | int | Imports data from a JSON string into the DataTable, and specifies the start and end positions of the rows and properties. |
ImportJsonByKey(this DataTable dataTable, string json) | int | Imports data from the JSON string into the DataTable based on the key name. |
ImportJsonByKey(this DataTable dataTable, string json, int startRow) | int | Imports data from the JSON string into the DataTable based on the key name, and specifies the starting position of the rows. |
ImportJsonByKey(this DataTable dataTable, string json, int startRow, int endRow) | int | Imports data from the JSON string into the DataTable based on the key name, and specifies the start and end positions of the rows. |
ImportXml(this DataTable dataTable, string xml) | int | Imports data from a XML string into the DataTable. |
ImportXml(this DataTable dataTable, string xml, int startRow) | int | Imports data from a XML string into the DataTable, and specifies the starting position of the rows. |
ImportXml(this DataTable dataTable, string xml, int startRow, int endRow) | int | Imports data from a XML string into the DataTable, and specifies the start and end positions of the rows. |
ImportXml(this DataTable dataTable, string xml, int startRow, int endRow, short startProperty) | int | Imports data from a XML string into the DataTable, and specifies the start and end positions of the rows and starting position of the property. |
ImportXml(this DataTable dataTable, string xml, int startRow, int endRow, short startProperty, short endProperty) | int | Imports data from a XML string into the DataTable, and specifies the start and end positions of the rows and properties. |
ImportXmlByKey(this DataTable dataTable, string xml) | int | Imports data from the XML string into the DataTable based on the key name. |
ImportXmlByKey(this DataTable dataTable, string xml, int startRow) | int | Imports data from the XML string into the DataTable based on the key name, and specifies the starting position of the rows. |
ImportXmlByKey(this DataTable dataTable, string xml, int startRow, int endRow) | int | Imports data from the XML string into the DataTable based on the key name, and specifies the start and end positions of the rows. |