At the time of writing this post, .NET has no specific facility to work with REST services. Though, some services over the web provide information in REST format. For example, http://www.geonames.org (that provides gegraphic information) has a lot of free web services to get geographical information. The other day, I needed to use these services [...]
Posts Tagged ‘Linq’
Dealing with REST Web Services
Posted in ASP.NET, C#, tagged .net, 3.5, ASP.NET, get, httpwebrequest, Linq, Load, post, rest, Save, service, StreamWriter, web, web service, webrequest, xelement, xml on October 10, 2008 | 2 Comments »
LinqDataSource with Select method!
Posted in ASP.NET, C#, tagged C#, fetch, Linq, LinqDataSource, LinqDataSourceView, Method, on demand, programatically, Select on September 28, 2008 | 5 Comments »
As I mentioned in the previous post, with Insert, Update and Delete methods but without a Select method, LinqDataSource control looks just like a chair with only three legs! Specially when it comes to situations that you have to retrieve records programatically.
I probed alot to see if there is a work around for this problem [...]
Sorting and ordering Linq results with string field names
Posted in ASP.NET, C#, tagged Field, IEnumerable, IQueryable, Linq, LinqDataSource, name, Order, Sort, SortExpression, String on September 10, 2008 | 4 Comments »
Hi,
Today at work, I had to bind a GridView control to a stored procedure through a LinqDataSource. To do this, I used LinqDataSource’s Selecting event. For example :
protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{ e.Result = CustomersBiz.GetAll(); }
If we bind a grid to a store procedure, the grid and LinqDataSource won’t support sorting automatically. Therefore, to [...]
Speed up Linq to Sql with compiled queries
Posted in C#, SQL SERVER, tagged C#, Compile, Compiled Query, Linq, Linq to sql, Performance, Query, SQL on August 15, 2008 | 2 Comments »
There is no doubt that tehre are some drawbacks to Linq to Sql. One of them is that the Sql statement is built dynamically so it is needed to be parsed and compiled each time you run it. Fortunately .Net 3.5 has a solution for this problem. System.Data.Linq namespace includes a class named CompiledQuery which [...]
A 3-Tier Architecture with LINQ TO SQL
Posted in Architecture, C#, tagged 3-TIER, Architecture, BUSINESS LAYER, COMMON LAYER, DATA ACCESS LAYER, LAYER, Linq, Linq to sql, N-TIER, SQL on July 28, 2008 | 5 Comments »
Recently, I posted a 5-part article about developing a 3-tier architecture using ADO.NET. In this post, I am going to mention how to develop such an architecture using Linq to Sql. Since the last article was too long, I am going to make this one short. Therefore, the architecture is not changed and [...]