ADO.NET Data services

ADO.NET Data Services is now included in VS2008 SP1. Fairly easy to install and get started. Created an ASP.NET web service to host the ADO.NET Data Services framework (service), the data source was the based on entities created using the entity framework. The service is addressable using either a REST format or through LINQ. Data formats returned include JSON and ATOM/PUB. Wrote a simple client to call into the service, the excercise of writing the service/client was suprisingly easy and fast.

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> ADO.net, Entity Framework | Comments Off on ADO.NET Data services

Learning LINQ – skip

Example 1:

var myPageQuery = from i in myPages
select i;

var startValue = 1;
var numberPages = 3;

//To get 3 pages
var collectionOfPages = myPageQuery.Skip(startValue).Take(numberPages);

Example 2:

int[] carSales = { 5, 200, 10, 9, 50, 60, 99, 77 };
IEnumerable orderedCarSales = carSales.OrderByDescending(g => g).Skip(2);
Console.WriteLine(“Car sales except the top two are:”);
foreach (int car in orderedCarSales)
{
Console.WriteLine(car);
}

Should see the following results:
77,60,50,10,9,5

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> Uncategorized | Comments Off on Learning LINQ – skip

Learning LINQ – Extension methods

Extension methods can be used to extend the set of methods that you can use for LINQ queries,

namespace TestConsoleApplication
{
class Program
{
static void Main(string[] args)
{
int[] myNumbers = { 1, 2, 3, 4, 5,7 };
// the j=>j lambda expression as a parameter to the method so compiler
// implicitly converts its value to double.
var avgQuery = myNumbers.MyCustomAverage(j => j);
Console.WriteLine(“My Average %=” + avgQuery);
}
}
//LINQ extension class
public static class MyLINQExtension
{
//This method takes – Func delegate as a parameter. This delegate // takes an object of generic type T and returns an object of type double.
public static double MyCustomAverage(this IEnumerable numbers, Func selector)
{
return ((from i in numbers select selector(i)).Average()/100);
}
}
}

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> .NET, Entity Framework, LINQ, Microsoft | Comments Off on Learning LINQ – Extension methods

Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta

Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 public beta now available per Scott Guthrie >>>

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> .NET, .NET Framework, Visual Studio | Comments Off on Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta

.NET code camp

Whew! codecamp was a great success.

Wally McClure, did a podcast>>>

While at the Huntsville Code Camp, some of the community leaders from Alabama got together with Wally McClure to do an ASP.NET Podcast roundtable discussion. We talked about what is going on in Alabama community-wise. If you don’t subscribe to the ASP.NET Podcast, you should. Here is the podcast from our discussion.

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> .NET, codecamp, Tech Events | Comments Off on .NET code camp

Day 1: Mix 08

Ray Ozzie’s Keynote outlined IE 8.0, Silverlight 2 Beta – indicated Mix is the starting point for key lauch milestones – product introduction culminating in PDC this year. Two distinct to services strategy – advertising and how internet is transforming all the existing msft products. Content-Community-Commerce were key drivers of community engagement. Innovation driven user engagement turn advertising such an economy…. Advertising mainly to monetise services – Ad platform – so significantly investing in search (yahoo). Web is impacting MSFT existing products. 3 core principles driving reconceptualization of the products- web as a hub, device hub,social hub. Personal collection of pc – rather then single pc. Enterprise moves to embrace the cloud. Distributed/Federated. 1st principle – personal – social mesh
2nd principle – business – power of choice as enterprise moves to embraces the cloud – apps. refactored to utility computing that will reshape enterprise applications. power of server/service symmetry.. 3rd principle – cloud. light weight rest based systems – small pieces loosely joined.
5 major connected devices(mesh), entertainment(license media once and look from any device, zoom.net, xbox, media room, media center),business-enterprise CRM platforms, office live crm- shift to utlity computing in datacenters and cloud – hyper v, system center products – virtual roductivity(office pc, office live, office mobile, sharepoint, exchange,office communication server),development – unified data management
BizTalk Services. Beta of SQL Server Data Services. 5th – connected development -.Net runtime, silverlight, .NET framework.

Scott Guthrie’s overview – introduces IE’s Dean Hachomovitz to show IE 8.0 wearing eight t-shirt and talking about 8 things in IE. increased – Interoperability, Css 2.1 support, css certifications, performance, html 5 start support, new dev. tools, activities,websites, 702 test cases to w3c site.
ie 8.0 compatility mode with 7.0. support connection events from html 5.0 – html’s dom storage.
great developer tools, immediate window etc. activities – live maps, in place reviews without going to page… write a little bit of xml… openservice specification available…
7.web slices…. can subscribe to parts of a web page – web slice…
webslice specification.
8. Beta1 for developers 9 msft/ie/ie8

Scott Guthrie – Silverlight sites – vodaphone, et, 20 century fox, mlb, lechtv, mlb.com etc.

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> .NET, Microsoft, Tech Events | Comments Off on Day 1: Mix 08

.NET codecamp in Alabama at Huntsville

Codecamp was a grand success – over 200 people attended. Everyone enjoyed the speaker and sessions. I’m glad to get some rest now.

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> Uncategorized | Comments Off on .NET codecamp in Alabama at Huntsville

.NET codecamp in Alabama at Huntsville

Great topics submitted for talks at code camp including,

A Peek at ADO.NET Data Services (AKA Astoria)
Introducing the ADO.NET Entity Framework
Getting Ready for Silverlight 2.0
Microsoft Expression Blend for Silverlight Developers
Windows Worflow
SQL Server topics

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> Uncategorized | Comments Off on .NET codecamp in Alabama at Huntsville

Alabama Code Camp – registration is now open

The registration is open for the 2nd Alabama Code Camp, on Saturday, February 23rd, 2008, here in Huntsville at Virginia College. The registeration link is https://www.clicktoattend.com/invitation.aspx?code=124330. The sessions are posted on the web site www.alabamacodecamp.com.

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> AL, Tech Events | Comments Off on Alabama Code Camp – registration is now open

.NET codecamp in Alabama at Huntsville

The location of code camp is

Virginia College at Huntsville
Network Engineering Department
2800a Bob Wallace Avenue
Huntsville, AL 35805

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> .NET | Comments Off on .NET codecamp in Alabama at Huntsville