Moving from LightSpeed 2 to LightSpeed 3
Tagged as LightSpeedLightSpeed 3 has a high degree of compatibility with LightSpeed 2: all existing LightSpeed 2 code should run unchanged against LightSpeed 3. However, there are a few minor changes which LightSpeed 3 users should be aware of.
.NET 3.5 SP1 dependency
LightSpeed now requires .NET 3.5 SP1, though we do still include a build that is compatible with .NET 2.0.
Obsolete APIs
The following APIs have been obsoleted. They are still available and still work in LightSpeed 3, but will raise a compiler warning, and will be removed in a future version.
- LightSpeedContext.Default and LightSpeedContext.BeginUnitOfWork. These were provided to ease migration from LightSpeed 1.x to LightSpeed 2, and are being removed because they don’t work well with LINQ and because many users have found them confusing. (Heck, even we’ve found them confusing.) Use the LightSpeedContext(string configurationName) constructor instead of LightSpeedContext.Default, and the LightSpeedContext.CreateUnitOfWork() instance method instead of LightSpeedContext.BeginUnitOfWork.
- IUnitOfWork.FindOne(object id). This has been renamed to FindById. This is because it was too easy to mistakenly call the FindOne(object) overload when one was intending to call FindOne(Query) or FindOne(QueryExpression).
Logging object
The logging interface, ILogger.LogSql, is declared to receive an object. In LightSpeed 2.x, the object was always a StringBuilder or a string. In LightSpeed 3, the object may also be an instance of the new CommandLog class. The reason for this is to provide structured logging information in case you want to display it in a custom format.
Existing code which calls ToString() or performs a cast to string will not be affected because CommandLog returns the same text as before in these cases. However, code which specifically assumes a StringBuilder will need to be updated.
Leave a Reply
Categories
BrainDump (1)
Community Code (4)
Events (16)
F# (14)
General (53)
Lab Samples (2)
LightSpeed (268)
MegaPack (8)
News (71)
NHibernate Designer (26)
Nightly news (53)
Phone Elements (24)
Products (87)
Projects (5)
Screencast (6)
SharePoint (3)
Silverlight (14)
Silverlight Elements (66)
SimpleDB Management Tools (20)
Visual Studio (9)
VS File Explorer (7)
Web Workbench (39)
WPF (44)
WPF Diagrams (57)
WPF Elements (110)
WPF Property Grid (32)



Posted by Ivan Towlson on 17 December 2009 


