background preloader

Transition

Facebook Twitter

Softies on Rails - Ruby on Rails for .NET Developers. Dealing with REST Web Services « Aspguy’s Weblog. 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, (that provides gegraphic information) has a lot of free web services to get geographical information. The other day, I needed to use these services to let the end user choose his/her country and then state from two drop-down lists.

So I had to figure out how to consume such services. In this post we will use the following service as an case-study: If you navigate to this link you will get the following result: As is seen, the resulting XML is pretty straight forward. For example, to query a REST service, like the one I mentioned above, we can use LINQ’s XML functionality. XElement rootXml = XElement.Load(“ After retrieveing the full xml, you can extract any kind of information you want. no matter how complex is it! LINQ to SQL (Part 2 - Defining our Data Model Classes) - ScottGu's Blog. In Part 1 of my LINQ to SQL blog post series I discussed "What is LINQ to SQL" and provided a basic overview of some of the data scenarios it enables.

In my first post I provided code samples that demonstrated how to perform common data scenarios using LINQ to SQL including: How to query a database How to update rows in a database How to insert and relate multiple rows in a database How to delete rows in a database How to call a stored procedure How to retrieve data with server-side paging I performed all of these data scenarios using a LINQ to SQL class model that looked like the one below: In this second blog post in the series I'm going to go into more detail on how to create the above LINQ to SQL data model. LINQ to SQL, the LINQ to SQL Designer, and all of the features that I'm covering in this blog post series will ship as part of the .NET 3.5 and Visual Studio "Orcas" release. Create a New LINQ to SQL Data Model Entity Classes Creating Entity Classes From a Database Delay/Lazy Loading. Video: Using LINQ with ASP.NET in VS "Orcas" (Part 1) - ScottGu's Blog.

One of my goals this year is to use video more with my blog. My theory is that video is often a better medium than text to walkthrough how something works, and can also help you avoid the tedium of reading though some of my really long blog posts... :-) Over the next few months I'm going to try and create a new video every other week or so on various topics. Many of these videos are going to involve first looks at some of the new features coming with Visual Studio "Orcas", which is our new release that will ship later this year. For today's video I decided to focus on introducing LINQ - which I think is one of the most exciting features coming with "Orcas". At a high-level, LINQ makes the concept of query a first class programming concept within .NET. Using LINQ you can easily query relational databases, XML files, as well as any plain-old .NET object.

Watch or Download the Video You can watch the video online here (it is 24 minutes in length). Specifics Topics Covered in this Video Scott. IT-Box - LINQ To Sql tutorial Series By Scott Guthrie (Pdf Book Format) Timer control - ASP.NET Ajax Tutorial. Timer controls allow you to do postbacks at certain intervals. If used together with UpdatePanels, which is the most common approach, it allows for timed partial updates of your page, but it can be used for posting back the entire page as well. In this chapter we will focus on using timers with UpdatePanels, so if you haven't already read the chapter on UpdatePanels, please do so now. Here is a small example of using the Timer control. It simply updates a timestamp every 5 seconds. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!

We only have a single CodeBehind function, which you should add to your CodeBehind file: protected void UpdateTimer_Tick(object sender, EventArgs e) { DateStampLabel.Text = DateTime.Now.ToString(); } This is all very simple. Home.