Tag | LINQ Posts

I had the opportunity today to write some more complex LINQ queries. First, I started with a simple group by expression allowing me to subtotal some data for a particular key. Certainly I could have done this in the database. Many would argue that that the database is the expert at these sorts of things, so we should let the expert take care of it. I have a couple of reasons for placing the group by in the LINQ query. First, I don't have a lot of control over the data layer. Second, I can unit test ...
The Magenic Technology Council (MTC) is proud to present the first annual Technology Summit in Chicago on June 20, 2008. This two-track, 1 day summit is packed with great sessions and TWO keynotes from Rocky Lhotka (Magenic, creator of CSLA) and Jay Schmelzer (Microsoft, Visual Studio Group PM.) In the Developer track, members of the MTC will present on Writing Better Code, the ASP.NET MVC framework, LINQ indexing techniques, WPF and Silverlight in UX design. The Server track offers sessions on SharePoint ...
The theme of this year’s Imagine Cup is "Imagine a world where technology enables a sustainable environment." It had been a great honorary for me to take part as one the Judges of the 2008 Imagine Cup Australia. All the teams worked real hard and came up with breathtaking solutions. The interesting part was solutions were built on top of cutting edge technologies technologies ie. Silverlight, Virtual Earth, LINQ, ASP.NET 3.5, WCF, .NET 3.5 and SQL2005. The Project SOAK is announced the winner of ...
Setup projects in Visual Studio 2008 puke on a certain GUID created by the LINQ to SQL DBML designer. When you create a DBML mapping using the designer, the following GUID is inserted into your project file, like so: <ItemGroup> <Service Include="{3259AA49-8AA1-44D... /> </ItemGroup> I have no idea how this is used, but it will cause any setup projects contained within the same solution to fail. I'm not sure if setup projects in other solutions (referencing by ...
Join my colleagues of the Magenic Technology Council (MTC) at the first annual Technology Summit in Chicago on June 20, 2008. This geeky, two-track, day-long mini-conference is packed with great sessions and keynotes by Rocky Lhotka and Jay Schmelzer, Group Program Manager on the Microsoft Visual Studio team. In the Developer track, members of the MTC will present on code quality, the ASP.NET MVC framework, LINQ indexing techniques, WPF and Silverlight in UX design. The Server track offers sessions ...
Andy Beaulieu with a real-world DeepZoom example, James Bacon releases a new SL2 casual game, Dave Relyea discusses the Canvas, Swiss DPE Team on Large resultsets with LINQ in SL2, and Peter McGrattan provides a SL2 Pie Chart. I just noticed we crossed the 1000-link mark in SilverlightCream. Thanks for all the submittals, everyone! From SilverlightCream.com: DeepZoom for eCommerce Andy Beaulieu has produced a very nice eCommerce site for his Father-in-Law's wood-turnings... I can't figure out which ...
Have you ever created a database object and said "OK, this column is going to correspond to this enumeration"? If you're obsessive like me, you might have even gone so far as to create column restrictions for the valid range of values, and created a special SQL type that doesn't really do anything except give you peace of mind. Well, I've got about three such fields on a couple entities on a recent project. Since I wanted those properties to go into C# enumerations, I tried the natural thing: I typed ...
As one of my colleagues put it, "We all struggle to stay up to date on our new technologies." To that point, he let me know about a goldmine resource for learning ADO.Net Data Services quickly: Great Screencasts ADO.NET Data Services - Surfacing Data ADO.NET Data Services - Querying with URI's ADO.NET Data Services - A Basic .NET Client ADO.NET Data Services - A Basic AJAX Client ADO.NET Data Services - A Basic Silverlight Client ADO.NET Data Services - Querying with LINQ ADO.NET Data Services - ...
I highly recommend downloading a free tool called LINQPad (http://www.linqpad.net) which execute LINQ queries and acts as a stripped down query analyser for your SQL Server databases. I love the ability to view the real T-SQL generated for the LINQ query, or as the lambda expression. It's incredibly simple, requires no install (other than .NET 3.5). It has that key attribute of good quality software; it deals with one simple task and executes it perfectly. I also like the author's suggestion to use ...
Microsoft .NET framework 3.5 Service Pack 1 and Visual Studio 2008 Service Pack 1 now have public BETAs. The service pack of Visual Studio 2008 has really interesting stuff. Highlights I'm interested in are performance improvements in HTML editor, collection of JavaScript intellisense hotfixes plus new ones enabling better JavaScript intellisense for libraries like jQuery, JavaScript Code Formatting, ASP.NET Routing engine (the one used in ASP.NET MVC, it is actually developed as separate component), ...
Here are the links from my May 12, 2008 presentation at the St. Louis C# User Group: 1. VS 2008 Product Comparison http://shrinkster.com/XH1 VS2008 2. Change startup options http://shrinkster.com/XYD VS2005 VS2008 3. Change home page http://shrinkster.com/XYD VS2005 VS2008 4. LINQPad http://shrinkster.com/XGZ VS2008 5. Importing/Exporting Settings http://shrinkster.com/XZJ VS2003 VS2005 VS2008 6. Consolas font on Windows XP http://shrinkster.com/XQ7 VS2003 VS2005 VS2008 7. Tab groups (code editor ...
Our www.Phillydotnet.org second installment of the 2008 Code Camp series will be held at the DeVry University campus in Fort Washington, PA on Saturday, May 17 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 40+ sessions (8:30, 10:00, 12:30, 2:00, 3:30) 8 tracks + lunchtime entertainment 500 seats with tables (laptops welcome) Free breakfast, lunch, ...
Quote: ...legacy code is simply code without tests. - Working Effectivly with Legacy Code - Micheal Feathers I was discussing testing with a friend the other day, mainly Test Driven Development and we got onto the topic of new code without tests and retrofitting them. The first thing that popped into my head was the above quote and the following: Quote: Code without tests us bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it ...
Just got back from the Microsoft Heroes Happen Here event in St. Louis. It was awful. This is the first event from Microsoft I have walked out on. The first track was titled Next Gen Web Apps and the presenter spent 15 minutes talking about CSS as if it was new and no one in the audience had ever seen it before. Next he moved on to LINQ and then lost me as he typed out the samples. Then we left. Maybe it was going to get better, but I couldn't make it any longer. It was definitely catered to the ...
April 30th Regina.NET and Regina IT Pro held the hereos community launch event. As far as I know, this was going to be the largest locally run (local speakers, facilities and sponsorship) IT community event. We booked 3 - 100 person classrooms and we had 3 speakers providing sessions that run concurrently, then repeated. The schedule looked like this Windows Server 2008; Room X SQL Server 2008; Room Y Visual Studio 2008; Room Z 6:30 AD, Hyper-V New Datatypes, Resource Governer LINQ, AJAX 7:30 AD, ...
Every blogger I read claims to have superior coding skills, and every place I have worked claims only to hire superior developers. In my current position and in my prior one, my employers say they interviewed more than twenty candidates to fill each position. If that's so, where are the average coders? I heard one theory - they are all unemployed! And they keep trying to get jobs but they can't. So interviewers have a skewed sampling of coders. I will confirm that in my current and previous position ...
Two of my latest books just hit the market - Professional C# 2008 and Professional Visual Basic 2008, both from Wrox. The back cover of the C# book is as follows: Updated for .NET 3.5 and Visual Studio® 2008, this book is the ultimate guide to C# 2008 and its environment. Beginning with a look into the architecture and methodology of .NET, the team of superlative authors explains why the C# language cannot be viewed in isolation, but rather, must be considered in parallel with the .NET Framework. ...
Coming Friday, June 20th in Downers Grove, IL The Magenic Technology Summit is a full day of Magenic-provided training. We have lined up an impressive array of speakers and topics in two tracks, .NET development and Microsoft servers. And we have lined up two keynotes. Our first keynote speaker is Jay Schmelzer, who is the Group Program Manager for RAD tools. This basically means he runs the teams for all the Visual Studio designers and related RAD tools. He’s an excellent speaker and should provide ...
Introduction So I find myself working in a BizTalk world these days. So most of what I am dealing with is WCF, SOA, bus, etc. related. However, there are times when I need to write an assembly that BizTalk can use to communicate with the outside world. The best way for BizTalk to interact with my assembly is with XmlDocuments that conform to an strongly typed XSD generated schema. After a bit of research across many sites, several colleagues interacting with one another over this issue, and finally ...
Today Microsoft unveils RoboChamps (www.robochamps.com), a simulated robotics league that is open to academics, hobbyists and developers from around the world, that demonstrates the power of the Microsoft platform to enable a broad range of developers to explore new ways to use .NET for robotics programming. RoboChamps is built on top of the Microsoft Robotics Developer Studio(MSRDS) 2008 CTP, and uses that product’s robust, physics enabled simulation environment to remove the barriers of entry that ...
Get a count and percentage of how many updates you've had with each twitter tool. Download C# 3.5 WPF Source Code Note: This source code is mostly a quick hack to get the data I wanted. Also, if you run this on your own data, note that you may need to wait a few minutes for results to come back. In testing out various twitter clients, I wanted to get a feel for my personal usage (how much I've used each client), so I decided I'd write some code around it. To begin, here are the results: web, 1770, ...
Date: Monday, May 12, 2008 @ 6:00 p.m. Topic: Data Access Layers with LINQ to SQL and ADO.NET Data Services Speaker: Scott Hanselman and Beth Massi, Microsoft Join Scott and Beth as they show you how to build a data access layer using LINQ to SQL and then how to expose the LINQ to SQL entities using ADO.NET Data Services. LINQ to SQL is an O/RM (object relational mapping) implementation that ships in the .NET Framework 3.5, and which allows you to model a relational database using .NET classes. You ...
I was just starting to read the very first pages of the great book "Beautiful Code" (by Andy Oram, Greg Wilson) this morning as a refreshment and as an indirect result to Scott Hanselman's list of basic must-read books (although it didn't include this book - BTW, I read parts of it before, and I don't remember why I stopped), I had to write this post. To all of you guys thinking in DDD, TDD, MVC, ASP.NET, shiny AJAX and RIA (Flash/Silverlight) controls, GC, SharePoint, Rails, Python, ORMs (NHibernate, ...
The examples I showed in my C# 3.0 presentation were based on the examples provided in the Visual Studio 2008 Training Kit. The source code for the new features in C# 3.0 are located, by default, in C:\VS2008TrainingKit\Labs\W... There are other great labs in this kit as well. Building Web Apps Building WPF Apps CardSpace Client Application Services Dynamic Sites Intro to ASP.NET Ajax JSON LINQ to SQL Silverlight Monster Factory LINQ in VB9 VSTO (Excel, Outlook, SharePoint, Word) Windows Communication ...
Employee Info Starter Kit is a starter kit, which includes very simple user requirements, where we can create, read, update ad delete (crud) the employee info of a company. The primary purpose of this starter kit is, to provide a solid guideline with respect to building enterprise level projects, by utilizing new asp.net 2.0 and sql server 2005 features, as well as latest best coding practices. The starter kit includes several cases where we can perform multi-table joining and/or write operations. ...
Long gap in blogging due to an ongoing release. This time back with DLINQ. Like the way LINQ to Objects work on Objects that implement IEnumerable, DLINQ works on Database objects. If you want to know the basics of DLINQ, here are some of the links: Basics: http://blah.winsmarts.com/2... DLINQ and Stored procedures: http://weblogs.asp.net/scot... Using DLINQ with ASP.NET: http://weblogs.asp.net/scot... ...
I don't think anyone will disagree that our thoughts can play a huge role in our emotions. One thing we have as human beings that sets us apart from every other species on the planet is self-awareness, the unique ability to analyze our thoughts and emotions and make adjustments to our behavior based on that self reflection. The following is for all the VB.NET developers who migrated to .NET from VB6 (or earlier versions). Close your eyes and imagine this scene in your head: Years ago, say in 1998, ...
This post-meeting post is actually a little delayed because I went from giving my presentation at the user group straight to the hospital where my son (Little Lou) was being admitted. To make a long story short, he has a rare medical condition which every now and again causes problems which require him to be admitted to the hospital. It's to the point now where when we notice the signs and symptoms, we just call his surgeon and then the surgeon calls the hospital and arranges for him to bypass the ...
One of the great things about LINQ to SQL is that you can add additional properties to the auto-generated classes via partial classes. However, occasionally people will run into this exception: System.InvalidOperationExce... Cannot assign value to member 'XXX'. It does not define a setter. Why does this sometimes happen whereas other times the "extra" properties added via the partial class work perfectly? To answer this, let's take an example. Suppose we have a contacts class (I've left out the ...

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

C# Excel Export from ASP.NET Page ----------------- --web Page - ExcelExport.aspx ----------------- <%@ Page Language="C#" MasterPageFile="~/MasterPag... AutoEventWireup="true" CodeFile="ExcelExport.aspx.cs" Inherits="Forms_Techniques_... Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="Conte... Runat="Server"> <asp:GridView ID="GridView1" runat="server"> </asp:GridView> <br /> <asp:LinkButton ID="LinkButton1" runat="server" ...
This is a discussion around why we're getting most of our tools as ports of Java or other platform tools as opposed to innovating and generating our own. Scott Hanselman is heading the discussion...we have alot of great devs in the room... So why? Here's what we've got written on the board: Time OSS Culture Apathy Platform Centricity $ Personality Good Base Hmm...interesting...note that all those Java tools that were originally created were done *without* Sun...Sun themselves told their *own* developer ...
Building a Web 2.0 Portal with ASP.NET 3.5 by Omar AL Zabir I'm sick of 600 page tomes that take the MSDN content and just add intro-style samples. Omar brings the saga of the PagesFlakes.com startup utilizing Ajax, ASP.NET 3.5, LINQ and Windows WF. Some things are out there for me (like Extenders) but the real- world aspect is breath of fresh air. Performance and measurement are strewn throughout. Examples of Omar's failures will hopefully save us time. Topics like Thirteen Production Disasters ...
WoW, it took a couple weeks to get everything in order; but we are excited to be hosting Heroes Happen {Regina} April 30th in Regina, Sask, Canada. I worked with the local IT Pro user group to create this night of community run technology sessions. What is interesting, is that we are holding 3 sessions concurrently, then we are running the same session again so attendees can participate in 2 of our 3 sessions. They layout will look like this Windows Server 2008; Room X SQL Server 2008; Room Y Visual ...
Tonight I will be heading to the Northern Virginia Ruby Users Group (NoVARUG) meeting tonight with Dave Thomas (PragDave) talking about metaprogramming in Ruby. Should be a great time and I'm sure it will be full tonight. For those interested in some introduction to metaprogramming in Ruby, here's a good link to help get you started. Metaprogramming in F#? One of the many things that has interested me in F# is that it was originally written as a language to write other languages. This of course leads ...
I have recently came up against a perfect opportunity to get stuck into LINQ to SQL, its a small project where RAD is top priority. As often is the case I need to audit changes to properties, normally I would probably do some work in the getter and setter of the property, but of course with LINQ to SQL I don't have access to the properties in the same way. Looking through the intellisense of the LINQ generated class I can see a PropertyChanged and PropertyChanging event, perfect! Not exactly. Here ...
So, the summit is going along pretty well so far. Yesterday was Day 0 with registration, open spaces discussion sessions and the welcome dinner, with lots of chances to reconnect with people I know throughout the industry. Especially some I haven't seen since last year. This morning is really Day 1, with the product team sessions kicking off. Right now Amanda Silver is discussing VB LINQ. It's going well and she's always interesting to listen to. There's this one guy though, that keeps interrupting ...
A major upgrade to the ASP.NET Dynamic Data was released on April 8th, 2008. This release is named ASP.NET Dynamic Data Preview. ASP.NET Dynamic Data allows you to automatically render fully functional data entry and reporting pages that are dynamically constructed from your ORM data model meta-data (LINQ to SQL or LINQ to Entities object model). In addition to supporting a dynamic rendering mode, it also allows you to optionally override and customize any of the view templates using any HTML or ...
This Saturday I'll be giving a presentation on LINQ to SQL at the Spring 2008 Maryland CMAP Code Camp:  www.cmap-online.org/CodeCamp/
I've been wrestling with LINQ the past few months trying to do a project for work (dumb idea). It has actually been pretty good for the most part, but I've run into a few problems that I can't quite figure out. I've posted on the ASP.NET Forum about it and currently waiting for a response. I'm on the verge of trashing most of it and just going back to SPROCs and SqlDataSources. Hopefully someone has done something similar or has a good idea of how to proceed ...
LeeOnTech blogs about a SL Modal Dialog, Scott Guthrie on Existing UI == UserControl, Chad Campbell has an update on his book, Chris Carper started blogging about the Business of SL, Adam Kinney blogged his new GamerCard, Dan Wahlin on ItemsControl Templates, Jaime Rodriguez on SL2 Instantiation, Jesse Liberty on SQL to DataGrid via WCF/LINQ, and Laurent Bugnion on a bug with skewing and opacity masks on reflections. I forgot to mention that Pete Brown of Irritated Vowel has changed his RSS feed ...
As I get settled in at this new job, I begin to take stock of what the company wants to accomplish: a solid, extensible product with the longest possible useful life. Given the fact that this product will probably take 2-3 years (total) to develop, that means learning the newest stuff and looking at some technologies that have yet to be released. The new technologies coming out of Microsoft in the next six to twelve months is staggering. Beyond products (like Windows 2008, SQL Server 2008 and Visual ...
I'm super pumped to be speaking at the Twin Cities Code Camp this weekend in Minneapolis! They have a fantastic set of speakers and sessions, and recently extended the schedule to include a sixth track! I'll be doing talks on introducing the Microsoft MVC Framework as well as how to implement MVC into your web-form based applications. Other topics cover everything: Workflow, F#, ORM, WCF, Spatial Computing with SQL 2008, Silverlight, Sharepoint, LINQ, CSLA...30 sessions over an 8 hour period...its ...
I've have been pretty quiet lately. Actually, I've been quite busy and it turns out that there isn't much new to share. However, this is one thing that comes to mind. A recurring pattern in my UI is selection criteria that can applied to a GridView. It turns out that frequently the same criteria applies to various screens. I use LinqDataSources to bind to DropDownLists for many of the criteria. It is not uncommon to use one controller for every page. Following this approach, I ended up with the same ...
I am hooked on ReSharper, and when I started using VS 2008 with ReSharper, I was feeling the pain with version 3.1. I would go back and forth between turning it off so I could access my Linq methods and avoid having ReSharper reformat my code into a nice mess, and turning it on so I could have it fix my usings and reformat my code nicely. I have been using ReSharper 4.0 pre-release version for a few weeks now, and it's working out pretty good. I only have to turn it off once in a while now. The lambda ...
Dan Wahlin's latest articles, Cheryl at Silverlight SDK on SL2, WS, and WCF, Sam Landstrom on using one animation for multiple objects, Scott Morrison digs deep on SL2 DataGrids, Andy Beaulieu on SL2 LINQ to SQL CRUD, and Mike Taulty on passing data between plugins. From SilverlightCream.com: My Latest Silverlight Articles This is a list of the latest Silverlight articles Dan Wahlin has written for .NET Insight. Many are 1.0 but some are 2, and all are worth looking at. Just because SL2 is here, ...
If you are an ASP.NET developer or want to become one, there are numerous books available that talk about the ASP.NET framework and/or how to build web sites using ASP.NET. Pact Publishing has a book that focuses specifically on the data presentation controls that are available in ASP.NET, including ASP.NET 3.5 called ASP.NET Data Presentation Controls Essentials by Joydip Kanjilal. The book provides a good introduction to the basics of how data binding in ASP.NET works and then expands on that introduction ...
The post assumes that you have basic under standing of LINQ. The following section tries to give some deeper insight in to the technology. A lot of examples can be found at 101 Linq Samples (http://msdn2.microsoft.com... 1. Language Integrated Query (LINQ): a. How does LINQ work? i. When you write an expression for DLINQ, the expression is converted to a set of DB commands. It then opens a connection to get data. ii. When you use LINQ to objects, it iterates through the ...
C# 3.5 provides a lot of good features and here are a few of them. Implicitly Typed Local Variables: The compiler derives the type from the initialized value. // Implicitly typed local variables. var myInt = 0; var myBool = true; var myString = "Time, marches on..."; These are greatly useful while using with LINQ. Automatic properties: No need to write the entire property syntax. class Car { // Automatic property syntax. public string PetName { get; set; } } · But they cannot be used to define read-only ...
Microsoft EDC 2008 Website is UP. You Can Click Here To Register. EDC will be April 13 and April 14 - In Cairo International Conference Center (Agenda) But Watch out. The Attendance Fee is 100 EGP. There're Invitations Available. An Invitation Code is required to register, and you get that by calling the guy mentioned in the right top part of the registration page, and you can call his mobile phone only on Egypt working hours. I've written about Microsoft EDC 2008 (Egypt Developers Conference 2008) ...