Contents tagged with LINQ
-
Serialize only specific class properties to JSON string using JavaScriptSerializer
About one year ago I wrote a blog post about JavaScriptSerializer and the Serialize and Deserialize methods it supports.
-
Linqer – a nice tool for SQL to LINQ transition
Almost all .NET developers who have been working in several applications up to date are probably familiar with writing SQL queries for specific needs within the application. Before LINQ as a technology came on scene, my daily programming life was about 60-70% of the day writing code either in the front-end (ASPX, JavaScript, jQuery, HTML/CSS etc…) or in the back-end (C#, VB.NET etc…), and about 30-40% writing SQL queries for specific needs used within the application. Now, when LINQ is there, I feel that the percentage for writing SQL queries got down to about 10% per day. I don’t say it won’t change with time depending what technology I use within the projects or what way would be better, but since I’m writing a lot LINQ code in the latest projects, I thought to see if there is a tool that can automatically translate SQL to LINQ so that I can transfer many queries as a LINQ statements within the code.
-
Tips and Tricks: Deferred execution using LINQ
Few days ago I was watching the Scott Allen’s video where he shows some interesting tips and tricks and ways to optimize your LINQ code. The following blog refers to one of his first tips in the video, so I’ve tried some tests which I’m going to explain here.
-
Calculate Business Days using LINQ
In this blog post, I will show one simple way to get the total business days within given range of two dates. Question related to this topic was asked several times in many ASP.NET / .NET Communities, so I thought it would be very good to document it with a blog post.
-
Get Distinct values of an Array using LINQ
In this blog post, I will show how you can filter your array and remove all duplicate elements so that the end result will be array with distinct values. Moreover, the main idea is to do this without using any other (two or more) array(s) to make this work.