Tag | LINQ Posts

Tampa Code Camp is coming up in just two weeks, so be sure to register now if you plan to attend. The speaker bios and full agenda haven’t been published yet, but the list of sessions is now available. If you’re going, be sure to check out my sessions: Coding Style and Standards (chalk talk) Code standards and styles are one of those topics that you either love or hate. Join your fellow developers as we talk about what our experiences have been, what worked, what didn't, and why having them is a ...
How do you stay up on new technologies? How do you approach learning a specific new technology? The first thing you have to accept is that the Microsoft technology stack has gotten so vast that it is simply impossible for a single person to be an expert in everything. This is the most important aspect to remember. This post is simply to describe my personal approach for staying up on new technologies in the hopes that other people will find something valuable in this to add to their toolbox. In terms ...
Can't wait to play around with the new Visual Studio 2010. There are some cool stuff coming, including a concurrency troubleshooting tool called CHESS. Many a times, I've felt like I was at the edge of insanity trying to track down a concurrency bug. This tool may come in handy. From Microsoft: CHESS: CHESS is a tool for finding and reproducing Heisenbugs in concurrent programs. CHESS attaches to a concurrent program and takes complete control over the thread scheduling. This allows CHESS to drive ...
For anyone who is interested in learning LINQ, there is a great tool available called LINQPad. It comes pre-loaded with over 200 examples to make learning easier. It is really useful for testing your LINQ queries. And best of all, it is FREE! Download it here ...
If you're in the Kansas City area and you haven't heard about Kansas City Day of .NET (or KCDODN) then you're missing out. KCDODN is Saturday, December 6th at the Centriq Training center. (Go here to register...) Looks like 4 tracks of .NET Developer goodness, including a session by yours truly. GWB'ers Jeff and John will be there as well... so come say hi if you're there. Kansas City Day of Dot Net Development Architecture SharePoint Special Interest 8:00am - 9:00am Registration & Breakfast ...
In this issue: Justin Angel, Shemesh, Albert Eyal, Steve, Ruurd Boeke, Mike Snow, Mehdi Slaoui Andaloussi, Gerard Leblanc, and Jesse Liberty. Also: Steve Smith has opened up a couple new 'feeds' sites that are of note: Azure Feeds and Silverlight Feeds. He has others that you can find info about on these sites but the main idea is to go to Silverlight Feeds and submit your material. I'm mentioning this in good faith that you will also submit to Silverlight Cream of course :) ... yet another source ...
In a recent post, Deepak describes how to generate enums using Linq to Sql and SqlMetal. 1. Generate dbml using SqlMetal. 2. Find reference columns in the dbml that will be used as enums in code. Change their type to the enum name. 3. Generate code using SqlMetal. I find this pretty interesting, but there would need to be some kind of conventions or configuration to denote which tables will be used as enumerations in the code. I think the way to tackle this is to create a custom msbuild task that ...
Topic: Migrating a Data Aware WPF Application to Silverlight 2.0 Presenter: Mike Benkovich, Microsoft Date: 11/18/2008 Time: 12pm - 2 pm Website: http://www.ilmservice.com/s... Abstract: One of the great things about WPF and Silverlight is that they’re both built on top of XAML and with Silverlight 2.0 you can leverage the latest data manipulation capabilities of LINQ. In this session we’ll take a look at a basic WPF application that pulls data from a web service. We will explore VB.NET’s ...
If C# 3.0 was all about Language Integrated Query (LINQ), then C# 4.0 is all about dynamic programming. What exactly does that mean? It means that C# 4.0 brings some of flexibility and declarative style of programming to C#. But what does that really mean? To sum it up in one keyword: dynamic. C# 4.0 is adding a new dynamic keyword which is used as a data type in much the same way the var keyword is used. Why is this important? The biggest reason is that it allows a C# program to use dynamic dispatch ...
As you may have noticed (perhaps on the Visual Studio Start Page), there’s a section of the MSDN reserved for the future of VB. The page is fairly bland at first glance, but there is a great reference to the new features of Visual Basic 10 available in the downloads that I dare say you should investigate. Of the upcoming news, some that stand out are multiline lambda expressions, “implicit line continuation” (AKA goodbye to the underscore, mostly), Auto-implemented properties (one line of code for ...
In this issue: Pencho Popadiyn, Dan Wahlin, Lee, Karl Erickson, Larent Bugnion, Manish Dalal, and Adam Kinney. Jeff Prosise has updated his Enigma Machine: Silverlight Enigma Simulator Updated. Shawn Wildermuth reports he has Updated My Silverlight 2/Astoria MSDN Article. Jesse Liberty is going to be Speaking at Code Mash 2009. David Anson reports he is Shamelessly benefitting from the work of others [Links to Silverlight Airlines and Surface samples for RTW!]... cool ports to SL2. From SilverlightCream.com: ...
/* The Singleton pattern assures that there is one and only one instance of a class, and provides a global point of access to it. There are any number of cases in programming where you need to make sure that there can be one and only one instance of a class. For example, your system can have only one web service manager, or a single point of access to a database. The easiest way to make a class that can have only one instance is to embed a static variable inside the class that A static variable is ...
This code contains a sequential workflow running in a console application. There is a sequence and inside the sequence a QueryActions and ForeachLoop. The QueryActions Activity is a custom activity that you can create through Visual Studio add >> new >> .... etc... it gives you a design surface where you can drop standard out of the box activities. In this case the QueryActions activity has inside of it a standard toolbox DBQuery activity which lets you point and click your way to a database ...
Microsoft.DevelopmentPost msdev = new Microsoft.DevelopmentPost(); msdev.Candidate = this; msdev.DieForProductDevelopment = true; msdev.HasLatestDotNetKnowledge = true; msdev.FollowMsExperts = new MsExperts[] { “Andrew Hejlsberg”, “Brad Abrams”, “Chris Anderson”, "Matt Pietrek" }; msdev.CrazyAboutList.Add(Cr... msdev.CrazyAboutList.Add(Cr... msdev.CrazyAboutList.Add(Cr... msdev.CrazyAboutList.Add(Cr... msdev.CrazyAboutList.Add(Cr... ...
During the last week I was brushing up my Data Structure fundamentals. It was great to get back the days of C style pointers, link list, binary trees etc. But at the same time I want to play around the anonymous delegates of C# 2.0. Both my wishes were granted...My data structures were based on C# generics. The TreeNode structure and the action delegate were both templatized(i.e. based on Generics public delegate void Action<T>(TreeNode<... p); public class TreeNode<T> { //Data public ...
I have been toying with functional programming a bit lately. I have been using lambdas and Linq when it has made sense in my code. I downloaded the F# compiler tools and mucked around with it a tiny bit. I read a few blogs that talk about functional programming concepts, etc. I have enjoyed reading the elegance of the paradigm, but never really got into it much. But then I sat in on an "Open Space" session where Scott Guthrie was talking. Most of it strayed from the standard "Open Space" format and ...
In this issue: David Miles, Shawn Oster, Jeff Weber, Justin Angel, and Nikola Mihaylov. I stand corrected in that the Kongregate tutorials referenced in the Jeff Weber link below are being ported to Silverlight ... the tutorials, NOT Kongregate... sorry for any confusion! The subject was correct, my commentary wrong :( David Anson has made some changes to his ChartBuilder... check out his post: Improving ChartBuilder's cultural sensitivity [ChartBuilder app/source updated!] I've read a bunch here ...
For those of you like me who missed PDC (though I did watch the streaming video as time permitted!) you can now catch some of the PDC content live at an event near you with MSDN Developer Conference. I'm going to try to head to the Atlanta one on December 16th. More details below as seen in Brian's blog: The Speakers Chad Brooks Jeff W. Barnes Wally McClure Glen Gordon Mark Dunn Steve Porter Murray Gordon Todd Fine Jim Wooley Brian Hitney Keith Rome Todd Miranda Dave Scruggs Shawn Wildermuth Mickey ...
In this issue: Boyan Nikolov, Scott Hanselman, Page Brooks, Justin Angel, and John Papa. If you haven't heard it yet, Mike Ormond has a post: MIX 09 Announced. I hope to see lots of old and new friends in 'Vegas this year! From SilverlightCream.com: A Silverlight Minesweeper Boyan Nikolov sent me this MineSweeper post this morning. I didn't have a chance to look at the code before running out the door, but I did quickly lose the game twice :) ... it looks like a good start, and since Boyan is providing ...
Wow! It's been a long time since I last posted. Time sure flies by. Funny enough, even though I haven't posted since March, not a ton of things have changed. Sure, summer came and went and football season has started and now is half over. College basketball is starting up. Me and my dogs still live in the country. I'm still single and looking. I am playing my guitar a lot more often now and still follow sports religiously. I took a trip a couple weeks ago for the second vacation I have really taken ...
Howdy, hello, and welcome to my new technical blog. The purpose of my blog is to look at features and tricks that exist in current and slightly less-than-current versions of .NET that, for one reason or another, I never bothered to learn. Don't get me wrong, I love the latest, greatest, on-the-far-horizon stuff as much as anyone, but the reality is for those of us building Line-of-Business apps, we are frequently limited in choice of which .NET framework we can target, and as such have to make optimal ...
Is anyone out there close to this subject? My editor at RedGate sent me a link to someone’s blog post that basically took me to this link where I found a beat around the bush statement eluding to the possibility of MS dropping LINQ to SQL. http://blogs.msdn.com/adone... As I have several applications running on LINQ to SQL I was wondering what people’s thoughts were on this subject. What do you think the odds are of them actually ...
This post from the ADO.NET team, and the initial response in the comments from Elisa Flasko, seem to be tolling the death bells for LINQ to SQL…or at least in its current form. Over and over in the blog post we’re told of Microsoft’s investment into EF and how that will be the “recommended data access solution for LINQ to relational scenarios”. So if you have heavy investment yourself in LINQ to SQL, you might want to start looking at EF…or contacting Microsoft to let them know you like your LINQ ...
C# in Depth - John Skeet If you are working with the 3.0 .NET framework, this book is highly recommended to you. It starts off with the basics and it goes up to describe generics, expression trees, LINQ (chapter 10), lambada expressions (chapter 9). The book is made up of a little less than 400pages of in depth descriptions and samples. The book is divided into three: History of C# C#2 - how it solved problems in the past versions C#3 - the new features The book gives very good information on where ...
Presentation by Anders Hejlsberg. It is 10 years later since they started C# C# 1.0 was about introducing the general concept of managed code. C# 2.0 was about finishing C# 1.0 but didn't have time to do. C# 3.0 is really about radical new thinking in the language - LINQ. They learned a lot about functional programming through this exercise. Today is about C# 4.0. Some of the trends that have shaped their thinking on C# 4.0. Declarative Dynamic - resurgence of dynamic programming languages Concurrent ...

Yesterday featured another day packed with sessions and started with a great keynote showing off the new Windows 7, what's coming onto us with .NET 4 and the new development environments (starring Visual Studio 10) as well as innovations in the field of Office (web office is going to allow editing and synching documents online).

Read the rest of this entry »

The code samples from my recent presentation at the Maryland CMAP code camp can be downloaded here:

N-Tiered LINQ to SQL

MVC and Unit Testing
Here are the slides for my “Shallow Dive: PFX” talk, as promised. http://www.slideshare.net/a... For the demos, I used the LINQRayTracer and C# Raytracer examples that come with the June08 PFX CTP. If you have any questions about PFX or the slides, just email or twitter DM me. Till next time, Alex Moore ...
Limitations in workflows requiring workarounds: Designer is slow – make a coffee slow! A setStateActivity is not the end of the Workflow’s current flow! In binding, how do you access the properties of dependnecy property sub-properties? a dependency property custom activity for receieveactivity binding must be inside the receiveactivity In rule condition, you cannot reference a dependency property in a custom activity a code activity cannot work on an adjacent activity without explicitly specifying ...
simulate: “file Streams into Memory, then JOIN the data in Memory, via LINQ to Objects” original article: http://blogs.claritycon.com... I wrote up a quick little WinForms project in VS2008 with .NET Framework 3.5, Code overview: 1. On Form_Load, a. create a List of People into DataDridView and in Memory b. create a List of Jobs into DataDridView and in Memory c. create a List of JobIds into ComboBox 2. On ComboBox_SelectedIndexChanged, a. Perform LINQ ...
Exciting half day training on Silverlight 2 Data Access. About 10 seats left for this event. Sing up now! Posted on 8/26/2008 2:10:31 PM Day of Silverlight 2.0 - Data Access - with John Papa Friday, October 24, 2008 While Silverlight empowers developers to use their .NET and XAML skills to develop Rich Internet Applications, it also can be used to build data driven Silverlight applications that communicate with multi-tier architectures. This session will demonstrate how to build Silverlight 2 applications ...
Capsule Review of More Effective C#: 50 Specific Ways to Improve Your C# by Bill Wagner I really found Bill's previous book (Effective C#: 50 Specific Ways to Improve Your C# (Effective Software Development Series)) very useful. I've recommended in many classes I've taught and also to clients while consulting. More Effective C# enhances the original with C# 3.0 and LINQ additions. Bottom line: If you want to be a serious developer that continually hones his (or her) craft, then you need this book. ...
October Meeting - 23 October 2008 6PM New Features in C# 3.0, PIZZA, AND FREE STUFF WHAT MORE COULD YOU ASK FOR?!? This month's meeting will start off with Pizza and then break into a presentation covering what's new in C# 3.0 by Chris Eargle. In C# 2.0, we received many features already present in other object oriented programming languages. C# 3.0 took a radical departure, presenting us with more a revolution rather than an evolution. Many of the language features have not been seen in an object ...
I decided to completely redesign my website www.galasoft.ch (yes, it's about time, I know). For this process, I decided to inspire myself (loosely) from my good friend Robby Ingebretsen's site, which is both simple and beautiful. Read the rest of this entry » ...
This is part 1 of what I intend to be something of a recurring theme: how to avoid the use of dynamic controls in ASP.NET. Whilst dynamic controls have their uses in a small number of cases, they come with a significant amount of extra baggage. For example: * Dynamic controls need to be created early in the page lifecycle to participate in viewstate * Dynamic controls need to be re-created on each postback, and assigned the same control IDs to maintain viewstate * Extracting values from dynamic controls ...
var bookQuery = from book in bookXml.Descendants("Item") let attributes = book.Element("ItemAttributes") let price = Decimal.Parse(( book.Elements("OfferSummary... && book.Element("OfferSummary"... ? book.Element("OfferSummary") .Element("LowestNewPrice") .Element("Amount").Value : (attributes.Elements("ListP... ? attributes.Element("ListPri... : "0"))) / 100 select new {Price = price}; Elements(“node”).Any() does the trick. ...
Suppose you have three tables in your database where one of them specifies a many-to-many relationship between the other two (example from AdventureWorks): Suppose also that you have a method such as GetVendors(int productID) that will retrieve all the vendors for a given product through the ProductVendors table (that is , the many-to-many table). Now, if this method is exposed via a WCF service, when your client calls it you will see an exception like this one: "System.ServiceModel.Commun... ...
For those Linux devs who don’t have something adamantly against Microsoft, Mono 2.0 has been released! From the release notes: Mono 2.0 is a portable and open source implementation of the .NET framework for Unix, Windows, MacOS and other operating systems. Release Date: October 6th, 2008 Major Highlights Mono 2.0 is a major milestone in the Mono project, and it supports the following features: Microsoft Compatible APIs ADO.NET 2.0 API for accessing databases. ASP.NET 2.0 API for developing Web-based ...
(Sorry A blog post in Dutch about a software conference in the Netherlands) Vandaag (Maandag 6 okt) waren we met z'n 3 afgereisd naar het pittoreske Noordwijkerhout waar de SDN Conference werd gehouden, oftewel SDC. Op de SDC waren sessies over bijv .NET, Information worker, DotNetNuke, Delphi, Database, Architecture en User eXperience. De sessie waar ik vooral naar toe was gegaan waren de .NET/Architecture sessies. Voor vandaag stonden voor mij de volgende sessies op het programma. Ik zal niet te ...
I’ve been doing development professionally now for maybe 18 months and my experiences over the last 8 months in an agile shop have made me realise just how much there is to know in the development arena and, more importantly, how much I would like to know in order to be really creative in my job and produce truly excellent software. In my previous job, I used a text editor to write Perl. There was no such thing as unit testing and copying and pasting was viewed as an aid to productivity rather than ...
The Heartland Developers Conference has come to Minneapolis and things start kicking off tonight with the pre-conference party, down at the Hyatt Regency in downtown Minneapolis. I attended the HDC last year in Omaha as a representative of Magenic and enjoyed it so much I decided to speak at the event this year (both in Minneapolis and Omaha.) I'm speaking on Monday and my time slot has some pretty tough competition with Andrew Troelson discussing LINQ Query Internals and Amanda Laucher discussing ...
What this new blog is about Tech - I'm going to blog about technical stuff that interests / excites / confuses / frustrates me. Meta-tech - I'm going to blog about over-arching concepts and issues related to software development. Philosophical, architectural, social... I hope this blog will have an interesting slant because I started a new career as a software developer at the age of 33. It’s been a roller coaster ride over the last 2 years (so now you know my age) and I’ve had a chance to reflect ...
I am currently RNDing Continuous Integration for our build process, as well as automating certain build processes that we use throughout the company. One issue that I found is that TFS Build Server 2005 plain refuses to build Visual Studio 2008 solution files, and after some research I found that it is because of the SLN version number. One method involves using a shim in place of MSBuild to call the .Net 3.5 MSBuild executable. The current shims are really weak and don't do the job properly, so ...
What a glorious little library from some sharp guys. We've been able to use the Framework 3.5 for back end processing, but have about 4,000 tablet PCs in the field infrequently connected by the most anachronistic, bandwith-challenged 56k modem, proprietary dial up hell you can imagine. Of course, these machines aren't allowed on the internet at all by the lockdown imposed by the security gestapo..their only connectivity is the sluggish modem. No matter how I break down the framework 3.5 silent install, ...
Phillydotnet.org 3rd code camp for 2008 will be held at the DeVry University campus in Fort Washington, PA on Saturday, October 11 from 8:30-5:00. Please register on our web site.-->Detailed directions are on the DeVry web site. sold out. There will be another Code Camp in May.--> Lots of code, just say no to slides! 8 hours 50 sessions (8:30, 10:00, 12:30, 2:00, 3:30) 10 tracks including new IT Infrastructure and Enterprise 500 seats with tables (laptops welcome) Free breakfast, lunch, and afternoon ...
Regular expressions are one of those things that you may not need very often, but when you do, it really solves the problem. The usage of the Regex static methods may seem difficult, but they're pretty easy. Being able to use regular expressions readily will help you quickly write some code that would take you many hours longer by parsing the strings. I've compiled some code that uses the basic features of the Regex class. This article only covers the coding side of it. In order for it to work, you ...
There seems to be a suspicious lack of documentation for C++ and the new .NET features like Lambdas and Linq. I've tried several things that ALMOST work, but there's just one piece of syntax that seems to be missing that would bring final success. Also, it seems like MS is trying to kill C++. All podcasts (except for those with Kate Gregory) are talking about C# and VB.NET and ASP.NET only hosts (naturally) C# and VB.NET. If you REALLY want, you can create some supporting functionality in a library ...
In theory, it's supposed to work. With links- Google maps And pictures- Yup, my dog. I love this pic. Stanley is only about 6 months old at this point and 60lbs. Now he's hit 100lbs and coming up on 3yrs. He has to be the happiest dog in the world, doesn't seem to have a care in the world. Sleeps on his back with his feet up in the air or on the kid's picnic table as shown here. He actually doesn't anymore, he's a bit too big and tends to dream "rowdy" and wind up falling off (which is pretty funny ...
It doesn't seem like all that long ago I was trying to get my head around exactly what a delegate was. Honestly it wasn't that hard for me coming from a C++ background, since they were an awful lot like function pointers. But still, the concept was just a little different. In the interest of making your UI more responsive, it's a good idea to thread some of the more intense work that occurs in your application. As soon as you say "Threading", a lot of people blanch and go pale, but it's really not ...
By now you should all know that you should never use long-running code in a WebService, as ASP.Net will simply run out of worker threads. However, another challenge remains, how do we allow clients to receive events without having to resort to polling (which I think is a really BAD practice). I read about how one could do this over at Udi Dahan's blog, but this seems like a bad practice to me, most importantly - it uses polling. Most people seem to forget that bandwidth can get expensive these days. ...