LightSpeed 2.0 Model Designer
A couple of days ago I dropped a teaser on my blog about an upcoming addition for LightSpeed 2.0 – the introduction of an design surface for Visual Studio which allows you to visually work with your LightSpeed models.
This feature has been added directly from feedback you gave us which asked us to consider code generation and visual modeling capabilities for LightSpeed to make it even easier to build up your models, particularly when working against an existing database schema (or a database schema you are maintaining on the side).
So with LightSpeed 2.0 we will be shipping 2 new additions:
1. A command line generation tool (think SQLMetal) which allows you to target an existing database and generate your model classes based on the existing schema. You can also use this to progressively regenerate if you are evolving your schema.
2. An add-in for Visual Studio 2008 which gives you the visual design surface. Let me elaborate on this a bit more..
Once you install the LightSpeed Designer you can add LightSpeed Model (.lsmodel) files to your project. These will hold the XML based definition of our model.
Opening our LightSpeed Model presents a design surface, a toolbox and a property pane for tweaking our entities. We support manipulating Entities through the design surface giving you the full flexibility you would expect when working with LightSpeed entities such as setting Validators, toggling EagerLoad behavior and specifying aggregate or back reference names.
Using the design surface is easy – you can start by using the Server Explorer and connecting to a local database. Tables can then be dragged on to the surface as Entities.
The Designer has some smarts, understanding the conventions of LightSpeed; So if we drag a second table called Team on to the surface, which already has a relationship to Employee defined in the database, and has the appropriate Id column defined – then the designer wires up and displays the relationship.
The output of all of this work is our model classes. Behind the scenes when we compile our project, a background code generation runs and updates a class file containing the definition of our model. We can extend these using partial classes if we have some customizations that we don’t want to be obliterated by the codegen.
Here is an example of some of the code it produces:
Both of these new additions are still in beta and we are just about to start getting them into the hands of our LightSpeed 2.0 beta testers for feedback. If you are keen to have a play, drop us a line and we can get you on to the beta program :)
3 Responses to “LightSpeed 2.0 Model Designer”
Leave a Reply
![]()
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



Tagged as 





Posted by Jeremy Boyd on 17 April 2008 



Wow, lightspeed looks awesome.
In some ways, it’s alot cleaner than linq to sql (no attributes).
If we had money to spend on an ORM, it’d be lightspeed.
[...] LightSpeed 2.0 Model Designer (Jeremy Boyd) [...]
Any chance the Lightspeed designer will work outside of VStudio? We have a need for an entity designer and ORM that can work in our own tools to allow adding entities.