LightSpeed 2.0 Released

Today, we’re pleased to announce the release of LightSpeed 2.0, the next major version of our high performance, high productivity .NET O/RM and domain modeling framework. Many months in the making, LightSpeed 2.0 introduces (among other things) first class LINQ support and a rich Visual Studio designer experience. In this post I’ll summarize some of the highlights of the 2.0 release. Later blog posts will drill deeper into each major feature.

h3. Visual Studio Designer

In LightSpeed 2.0 we’re introducing a powerful Visual Studio design surface.

LightSpeed 2.0 Model Designer

The framework has always worked (and will continue to work) perfectly well without requiring a code generation system. However, several customers gave us feedback that they wanted to use LightSpeed with legacy schemas, or, that they preferred to work using a more data-centric approach. Our designer serves this purpose, letting you drag on tables from the _Server Explorer_ or entities from the _Toolbox_. Not only that, but the LightSpeed 2.0 designer supports _round-tripping_ and is template based. Round-tripping means that the designer can detect schema changes in the underlying database and automatically update the entity model. Templates, on the other hand, mean that the designer generated code is generated from user editable template files (Velocity templates) making it easy to customize the generation process. Furthermore, we’re including a command-line generation tool enabling easy integration into a build process.

h3. LINQ

LightSpeed 2.0 introduces LINQ support.

var query = from m in unitOfWork.Members
            where m.UserName != "jb"
            select m;

The nice thing about LINQ in LightSpeed is that it’s simply sugar for our existing querying API. This means that LINQ queries transparently take advantage of our powerful eager loading system and named aggregates. In fact, it’s important to note that LightSpeed 2.0 is in no way dependent on .NET 3.5 – it will work quite happily targeting .NET 2.0 – just minus some LINQ love.

h3. Improved API

Based on customer feedback we decided to make our main unit of work API more _explicit_ in LightSpeed 2.0. The new API provides more control over unit of work life-cycle and also facilitates connecting to multiple back-ends at the same time (see Multiple LightSpeedContexts below). In a nutshell, the new API looks like this:

// create a LightSpeedContext
LightSpeedContext context = new LightSpeedContext
  ConnectionString = "My Connection String"
// perform some work
using (IUnitOfWork unitOfWork = context.CreateUnitOfWork())
  // load and work with entities
  // save any changes

h3. Multiple LightSpeedContexts

As previously mentioned, LightSpeed 2.0 now supports accessing multiple database back-ends concurrently. This is enabled by simply creating multiple LightSpeedContext instances like so:

// create a SQL Server LightSpeedContext
LightSpeedContext sqlServerContext = new LightSpeedContext
  ConnectionString = "My Connection String",
  DataProvider = DataProvider.SqlServer2005
// create a SQLite LightSpeedContext
LightSpeedContext sqliteContext = new LightSpeedContext
  ConnectionString = "My Connection String",
  DataProvider = DataProvider.SQLite3

h3. SQL Calculations & Functions

We’ve also enriched our querying API to support arbitrary aggregation calculations such as MIN and MAX and also baked in support for SQL functions like UPPER and LOWER etc.

// perform a calculation
var query = from t in UnitOfWork.Tags
            select t.Usages;
int mostUsedTag = query.Max();
// call UPPER SQL function
var query = from c in UnitOfWork.Contributions
            where c.Title.ToUpper() != "TITANIC"
            select c;

h3. Download Express – It’s Free!

Interested in taking LightSpeed 2.0 for a test drive? Download LightSpeed 2.0 Express – It’s free (even for commercial use) but only supports a maximum of 8 entity types.


The Mindscape Team.

kick it on

Tagged as LightSpeed, News

17 Responses to “LightSpeed 2.0 Released”

  • […] The Mindscape Blog The LightSpeed page Download the free Express edition of LightSpeed […]

  • […] DotNetKicks:  LightSpeed 2.0 has been released.  LightSpeed is a .NET O/RM and domain modeling framework.  New release has LINQ support […]

  • Does it support dropping and creating the database?

  • Hi Jake,

    Currently we don’t support directly creating or dropping databases from within the designer (I assume you’re referring to the designer?).

    What is your reasoning behind wanting this feature rather than, for example, using SQL Management Studio? I’m interested to learn more about the use cases you are interested in.

    Thanks for dropping by,


  • This may seem stupid but in a few smaller sites that I’ve done with linq to sql – for my integration tests I’ve been dropping and recreating a test database so that its schema is exactly the same as my dev database. This is achieved using the DataContext methods DropDatabase and CreateDatabase, a handy feature, but I guess it goes against model first design?

  • Hi Jake,

    Nothing wrong with your approach. We typically use database migrations combined with transactional tests as it means our tests run faster.



  • Ahah Moment! I will look into it :)

  • Congrats on the new release. The API improvement looks really nice.

  • […] […]

  • […] Andrew mentions in his overview, LightSpeed 2 incorporates LINQ (Language Integrated Query) support. If you’re using C# 3.0 […]

  • […] a free version of LightSpeed which is restricted only in the complexity of models it can handle. The Mindscape blog has more details. SHARETHIS.addEntry({ title: “A Small and Fast Domain Modeling Tool”, url: […]

  • […] based in Wellington (NZ) that had the office in the same building where I worked for Calcium, just released the second version of their domain modeling framework, named […]

  • Good to see LightSpeed now supports multiple contexts – I probably would have used it for my current project if it had been able to do this a few months back ;) nice work guys

  • Does light speed implement the specification pattern?
    Also, does it support n-tier developmet scenarios?
    Linq-to-Sql suffers greatly in this area. (Google it!)

    If the answer is yes, do you document the strategy for using LightSpeec 2.0 in distrubuted environments?


  • @Dan,

    Yes, LightSpeed implements the Specification pattern as a fluent API for defining repository query expressions. This is also fronted by LINQ if you want to go that way.

    We’re committed to supporting n-tier scenarios and are currently working on putting together a WCF REST sample using LightSpeed entities. What n-tier support, in particular, are you after?



  • It would be great if you post download link for this example with source code (together with all dlls) because i can’t get it to connect to sqlite (or it connects but then get an error “The ConnectionString property has not been initialized.”)


    All or our packaged samples work out of the box. Please post to the forums if you run into any issues.



  • Leave a Reply


Join our mailer

You should join our newsletter! Sent monthly:

Back to Top