Tag | LINQ Posts

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. In order to get a better idea of what I want to reach, I decided to work like most web designers and to create a mockup first. Instead of creating a static picture, however, I used Expression Blend, a tool I am fairly proficient in, to create a WPF application demonstrating ...
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. ...
For some time I've been wondering if there's a better way to program business logic. Years ago I used to write COBOL, then moved onto a 4GL, bla bla bla... and today I find myself well entrenched in OO with Microsoft's .Net. Development times don't seem to be much better these days - and the complexity of things seems to have mushroomed. We went from barely-a-3GL to 4GL back to 3GL plus an explosion of things you need to consider. We started with procedural code then moved to OO and seem to have ...
In the years since the .Net runtime was first released I've seen a number of ways of accessing a SQL database from within VB.Net (or C#). One person I worked with had a nifty utility which would take any database and generate all the code to access it. It has been on my list of jobs to do to implement my own such tool but like other jobs, such as winning the National Lottery or winning a high stakes poker game I have never got around to it. OK the poker game is something my wife will have to do - ...
The other night at our local development group, the Charlotte based Enterprise Developers Guild, Brian Hitney from Microsoft gave and Overview of Microsoft ASP.NET MVC. This is my first time seeing the MVC pattern from Microsoft. This is the take away Items from this talk which may be helpful to those that are new to the MVC concept. Routing Before discussing the structure of the MVC pattern, it is important to understand how pages are routed through the MVC. Using a Routing table, links are directed ...
I have been monitoring the site www.x-tensive.com for a while, waiting to see the new release of DataObjects.NET because i have been looking for a very good ORM for .NET, something that would be better than ADO.NET Entity Framework and better than Developer Express XPO and better than CSLA by Rockford Lhotka. One of the main problems i found by using stored procedures (used by Lhotka) as part of the architecture is that they are very limited in the number of parameters they can take. Especially in ...
It’s been almost an year, The "Houston Tech Fest" came again! Contrary to last year, this year there are several Non-Microsoft tracks added to the event. Overall there are 1) 3 .NET tracks 2) 3 Java tracks 3) 2 General tracks 4) a special Silverlight track 5) 1 Security track 6) Alt.net track If you are nearby Houston, this is one of the cool event to attend to know your community. Register now, if you haven't so far! Looking at the agenda, you can see SOGETI presenting in every time slot 11:30 AM ...
Many of you use timestamp in LINQ to SQL because it's easier for us figure out if an object is new or not. This is specially useful when we need to track the state of objects in disconnected/N-tier scenarios. An important thing to note, though, is that the timestamp column is mapped as a System.Data.Linq.Binary property in the LINQ generated object so it is part of the XML serialization when you use the LINQ to SQL objects in Web Services/WCF services. The real problem is that System.Data.Linq.Binary ...
*Moved to: LINQ to XSDAbsolutely brilliant. That's what I think of Linq to XSD. Disappointed that is only works in C#, but having to use C# for a single project out of a solution it is a small price to pay to get the functionality. If you install the LINQ to XSD Preview Alpha 0.2 Refresh you get a couple of extra project definitions:Read more...Follow my new blog on http://blog.hinshelwood.com ...
Introduction I recently starting fooling around with the new XML LinQ stuff in .Net, and it is very impressive. One thing that I found missing was the ability to serialize objects directly into XElements. However, Microsoft did provide the means to get me to hit the ground running and it took a couple of minutes for me to get it right. Readers and Writers One thing the classical .Net XML always lacked was an "XmlNodeWriter", a writer that basically allows you to create DOM XML nodes using a standard ...
I have decided I will be attending DevConnections November 10 - 13th in Las Vegas, NV DevConnections has a number of events running at the same time, with registration, you can attend any of these events - ASP.NET Connections - VS.NET Connections - SharePoint Connections - SQL Connections - DNN Connections - Exchange Connections - Unified Connections - Windows Connections Some of the speakers include Dino Esposito, Rick Strahl, Markus Egger, Robert Howard, Miguel Castro, John Papa, Julie Lerman, ...
Stackoverflow.com is a soon-to-be-released developer community website from Jeff Atwood and Joel Spolsky. It is an evolution of existing sites in the genre, adding reddit and wiki type features to the traditional forum style site. The technology stack it uses is nearly identical to my current personal project: Asp.Net MVC, jQuery, Linq-to-sql, sql 2005. The truly fascinating thing about stackoverflow.com is the buzz. There are already thousands of users on the private beta. I predict, and Joel Spolsky ...
Hi, I am working on LINQ since last few days and I think it is a very interesting technology to work on. Before that I used to work on Subsonic to generate code for my Data Access Layer, now by using LINQ not only I have my Data Access Layer but also a lot of more functionalities. Yesterday I faced a situation where I had to SELECT BETWEEN some values according to my LINQ query. At last I came to the point that LINQ does not have SELECT IN (a1,a2,a3 ...) so I had to do following: int [] data = new ...
So what do you do on a rainy day in Denver? Well, if you are me you will catch up on some blogging and get some other delinquent tasks. I know that I have been hiding under a rock but there has been so much going on. I just finished up a project for a client and next week I am teaching a WSS 3.0 deep dive course at AmeriTeach. Also it looks like I get to catch up on some much needed relaxation. From a previous post Chris Givens, the author of the Advanced SharePoint Developer course, sent me a copy ...