List<myObject>=myIenumerable.ToList<myObject>();
List<myObject>=new List<myObject>(myIenumerable);
the performance take a big jump.
a blog to share Microsoft technologies Azure, DotNet, SharePoint, SQL Server,JavaScript Framework: Node.JS, Angular, React
{
"id": "0001",
"type": "donut",
"name": "Cake",
"ppu": 0.55,
"batters":
{
"batter":
[
{ "id": "1001", "type": "Regular" },
{ "id": "1002", "type": "Chocolate" },
{ "id": "1003", "type": "Blueberry" },
{ "id": "1004", "type": "Devil's Food" }
]
},
"topping":
[
{ "id": "5001", "type": "None" },
{ "id": "5002", "type": "Glazed" },
{ "id": "5005", "type": "Sugar" },
{ "id": "5007", "type": "Powdered Sugar" },
{ "id": "5006", "type": "Chocolate with Sprinkles" },
{ "id": "5003", "type": "Chocolate" },
{ "id": "5004", "type": "Maple" }
]
}
we define the c# object MyJson based on the JSon xml Schema
var slashRegex = new Regex(@"(?:\s*\""\s*)+");
var filterExpression=MyColumnName.Contains(" MySearchCriteria ");
filterExpression = slashRegex.Replace(filterExpression, "\"");
after i apply the regular expression.
MyColumnName.Contains("MySearchCriteria")
string ConnectionString = string.Format(@"Provider=Microsoft.ACE.OLEDB.12.0; Data Source={0} ;
Extended Properties=""Text; HDR=NO;FMT=Delimited; CharacterSet=65001;IMEX=1;"";",
Excle File with absolute path);
var gridMasterTable = $find("<%=leadGrid.ClientID%>").get_masterTableView(); gridMasterTable.set_dataSource(new Array()); gridMasterTable.dataBind();
<ClientSettings> <ClientEvents OnGridCreated="leadGrid_Created" OnCommand="Customer_Command"/> </ClientSettings>
protected void Application_PostAuthorizeRequest() { if (IsWebApiRequest()) { HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required); } }
private static bool IsWebApiRequest() { return HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath.StartsWith("~/api"); }