LightSpeed and LINQPad: the perfect partners
LINQPad is a justly popular tool for trying out LINQ queries — it’s a great way to quickly check how a query will behave or just to check what’s in your database. (Actually, it’s a great way to test quick code snippets whether LINQy or otherwise.) LINQPad version 2 has just shipped, and in addition to the familiar LINQ to SQL support, it allows you to plug in other LINQ providers — such as LightSpeed.
We’re pleased to announce the immediate availability of a LightSpeed driver for LINQPad. This means you’ll be able to test LightSpeed queries using your LightSpeed domain model with all the speed and convenience of LINQPad.
And of course, because the driver uses LightSpeed, you’ll be able to use all the facilities of LightSpeed — for example, to perform Lucene-based full-text search from within LINQPad, or to include or exclude soft-deleted entities from the query.
To get the LightSpeed driver, just go into LINQPad, click Add Connection in the data sources list, choose View more drivers…, and choose the LightSpeed driver from the list. LINQPad will automatically download and install it. Once this is done, you’ll see LightSpeed in the Add Connection dialog. Select LightSpeed and click Next.
Now all you need to do is configure the connection with details of your database and the assembly containing your LightSpeed model. You’ll need to tell LINQPad the following details:
- What kind of database you’re talking to (SQLite, MySQL, SQL Server, etc.)
- The connection string for the database
- The assembly containing the LightSpeed model (your compiled EXE or DLL)
- The strong-typed unit of work class in that assembly (don’t forget the namespace!)
To save time, you can also use the Infer from Model button to extract this configuration information from your .lsmodel file. (You’ll still need to have built the DLL or EXE though.)
You can also set up LightSpeed context properties such as whether table names in the database are pluralised and whether to quote identifiers in queries. If you’re planning to use LINQPad to do ad hoc inserts and updates, you can also specify the identity method and timestamp strategy.
That’s it! You’re ready to get querying!
(If you have any trouble with the automatic download of the LightSpeed driver, you can instead download it directly from Mindscape here and install it using the Browse button on the “Choose a Driver” screen.)
You can get LINQPad here. And if you don’t already have LightSpeed, you can get the free Express edition here. And if there are any more features you’d like to see in the driver, let us know in the LightSpeed forum!
Silverlight Elements now available for preview
We’re pleased to announce a technical preview release of our Silverlight Elements suite, a pack of controls for Microsoft’s Silverlight Rich Internet Application platform. Silverlight is becoming an increasingly popular solution for building business applications as well as graphically rich media-oriented applications, and Silverlight Elements builds on that.
The Silverlight Elements suite includes six main controls:
CoverFlow
CoverFlow provides an animated, pseudo-3D selection control in which elements “flow” across the screen around a focal selected element. It makes an attractive alternative to conventional list controls for rich media applications, allowing users to quickly browse a gallery of images or even interactive components.
ListView and MulticolumnTreeView
Silverlight doesn’t have multicolumn controls like the ListView built in, but they’re really handy for displaying tabular data in a less heavyweight form than a full-on data grid. In addition, we know a lot of people need to be able to display tabular information against hierarchical data, so we’ve also provided a MulticolumnTreeView (or “tree list view”).
Scheduler
Time-based display is a common requirement for business applications. The Scheduler control supports displaying items in a similar way to the Outlook calendar, with options for daily, weekly and monthly summary views. Use it for appointments, bookings, task management, equipment utilisation or whatever your time-based requirement is.
RichTextEditor
The Silverlight Elements RichTextEditor supports the most common HTML editing requirements and is suitable for rich text notes, forums-type software, etc.
ColorPicker
The last control in the suite is a compact selection tool for colours. Users can choose from standard colours, including an attractive Office-style palette or a custom palette, or mix their own. There’s also a PaletteColorPicker for when you want to keep users to a specific set of “theme” colours.
Where can I get it?
Silverlight Elements is currently available in preview form to all customers. The components are currently of beta quality so please let us know when you run into bugs or if you have ideas about how things could be made easier or more convenient. The preview is free to all existing customers, so jump into the store and give it a spin!
LightSpeed support for Visual Studio 2010 RC
Tagged as LightSpeedA quick note to those that are exploring the Visual Studio 2010 release candidate – we have published a test version of the LightSpeed designer in the online store. If you are using VS 2010 RC then head over to your account page and grab the download. It installs side by side with the VS 2008 LightSpeed designer so it’s really easy to get up and running with.
There are no feature differences – just that we support VS 2010 :-)
As this is a test version, please let us know if you have any issues by posting them in the LightSpeed forum.
I hope that helps.
WPF Elements 2.0 is here!
We’re proud to announce the release of WPF Elements 2.0, the latest version of our package of controls for Windows Presentation Foundation. WPF Elements 2.0 includes four great new controls to quickly provide an even richer user experience to your applications, five good looking themes based on Microsoft Office and Expression Blend and many enhancements to the Elements 1.0 controls.
CoverFlow
CoverFlow is a list control that presents the selected item front and centre, with the unselected items arranged in a pseudo-perspective view around it. It provides a visually attractive and nicely animated way to present visual collections such as collections of photos, pictures or charts.
You can read more about CoverFlow, with link to a live demo, here.
ColorPicker
The ColorPicker control allows users to select colors in three different ways:
- Standard colors: a list of the built-in WPF colors displayed as a list of swatches along with their common names.
- Custom colors: allows users to mix their own colors using sliders or text boxes to specify the red, green, blue and alpha channels.
- Palette mode: similar to the color picker seen in Microsoft Office. This allows you to define the palette for your application so as to encourage users towards choices that work well together. You can customise the palette contents, arrangement and tooltips.
Here’s the palette view, showing a colour palette appropriate for modern graphic designs:
Here’s the custom color mode that gives the user full control to mix their own color. The colors on each of the sliders change dynamically making it very easy to see how changing each color channel will affect the result.
By providing your own style for the ColorPicker control, you can define which modes are available, style each mode however you like, or even have the ColorPicker displayed inside a window instead of a drop down.
AutoCompleteBox
The AutoCompleteBox helps to save typing and reduce errors by providing users with suggestions as they type. The user can quickly choose a suggestion with the arrow keys and thus “auto-complete” their entry.
To avoid confusing the user with too many suggestions, you can configure the AutoCompleteBox to limit the maximum number of suggestions to display at a time, and also not to display any suggestions until the user has typed a reasonable number of characters. You can also implement your own suggestion provider to perform custom matches, for example against custom sources such as the file system or using custom strategies such as matching initials (e.g. for WL suggest WriteLine).
PromptDecorator
This control can be attached to other controls to display a prompt telling the user what the control is for. The prompt is overlaid on the other control, conserving screen space and giving a smooth modern appearance, but disappears when the user clicks on the control so as to keep the control free of clutter when the user wants to type into it. The PromptDecorator can easily be styled to customize the look of the prompt allowing it to display images as well as text.
Here is the PromptDecorator being used in 4 different ways. The first one is simply being applied to a TextBox. The second one is also applied to a TextBox, but has been given a custom prompt template to include the magnifying glass. The next one shows the PromptDecorator being applied to an editable ComboBox. And the last one is being applied to the AutoCompleteBox.
Take it for a spin
If you have .NET 3.5 installed and want to have a play around with all of the controls included in WPF Elements, then you can see it live here. This also shows the cool new themes. You can also download a trial copy to try it out in your own applications.
We are always open for suggestions for improving these controls or ideas of more controls that you want to see. Put up a post on our forum and let us know!
Moving from LINQ to SQL to LightSpeed
Tagged as LightSpeedLINQ to SQL has been a very popular technology with SQL Server users, providing far greater ease of use than previous Microsoft data access technologies and introducing many .NET developers to the concept of object-relational mapping. However, LINQ to SQL delivers only very basic domain modelling capabilities — no aggregates, no value objects, etc. Not to mention that it’s tightly coupled to SQL Server and that Microsoft, who are trying to encourage adoption of the Entity Framework instead, are no longer enhancing LINQ to SQL.

Figure 1. Microsoft’s roadmap for the popular LINQ to SQL framework. (Artist’s impression.)
So what if you’re hitting the limitations of LINQ to SQL and want to move on to something better? Or what if you just want to try out an alternative ORM, but don’t want to have to build a whole new model from scratch just to try it out?
First things first: this is never going to be a completely transparent process. Every ORM has different conventions for defining units of work (LINQ DataContexts), setting up configuration, and so on. Having said that, LightSpeed 3 does include a handy new feature that should cut down on the workload.
If you drag a LINQ to SQL DBML file from Solution Explorer into a LightSpeed model, we’ll load your existing LINQ classes into the LightSpeed model. Easy as that! So you can easily keep your model, including any customisations and mappings; plus now you get all the benefits of the LightSpeed designer, like database synchronisation, and can start marking up your model with LightSpeed features such as eager load aggregates.
Here’s how it looks – the original LINQ to SQL model on the left, and the LightSpeed model on the right (click for full size):
A basic version of LINQ to SQL import is included in the LightSpeed 3.0 RTM. We’ve rounded out this feature a bit in the nightly builds, so if your LINQ model uses inheritance or access modifiers, you’ll want to get the updated version. As always, if you’re using a LINQ to SQL feature that the converter doesn’t handle, let us know and we’ll see what we can do.
![]()
BrainDump (1)
Community Code (1)
Events (6)
General (27)
Lab Samples (2)
LightSpeed (112)
MegaPack (3)
News (37)
Products (51)
Projects (4)
Screencast (6)
Silverlight (1)
Silverlight Elements (1)
SimpleDB Management Tools (8)
Visual Studio (4)
VS File Explorer (4)
WPF (28)
WPF Diagramming (11)
WPF Elements (15)
WPF Property Grid (20)
![]()
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
![]()
Darryl Burling
JB’s Blog
JD’s Blog
Loud Thinking
Martin Fowler’s Bliki
Rowan Simpson
Scott Hanselman
ScottGu’s Blog






Posted by Ivan Towlson on 1 March 2010 












