SilverLight Video Examples

SilverLight Video Examples

Old forum URL: forums.lhotka.net/forums/t/6910.aspx


Mick_G posted on Wednesday, May 06, 2009

I am not yet very familiar with Lambda expressions and all of the examples fail in the business.server "TestObject.CS" source file on the line:

public static PropertyInfo<int> IdProperty = RegisterProperty<int>(c => c.Id);

with the following error:

Error 1 Cannot convert lambda expression to type 'Csla.PropertyInfo<int>' because it is not a delegate type 
Y:\CSLA Video Series SilverLight\N-Tier\SL04\Demo004\Business.Server\TestObject.cs
 12 72 Business.Server

I just know I am doing something dumb, like the wrong build order, Help!

Mick

RockfordLhotka replied on Wednesday, May 06, 2009

You need:

  1. .NET 3.5 SP1
  2. Visual Studio 2008 SP1
  3. CSLA .NET 3.6.2 or higher

There's very little that can go wrong opening the solution and building it, so if that fails it is probably the case that you are missing one of these pre-requisites.

Oh, one other thing is to check and make sure the Csla.dll references in the projects are correct. It it quite likely that the relative path from where you unpacked the zip file to where your Csla.dll files are located is different than on my machine, in which case VS won't find the DLLs.

Or make sure you use relative folder structures like this:

..\Source\cslacs
..\Source\cslalightcs
..\CslaClass\CslaLight\Demo001
..\CslaClass\CslaLight\Demo002

The more I think about it, the more I think this second idea is the most likely culprit.

Mick_G replied on Thursday, May 07, 2009

Thanks Rocky but looks like it turned out to be the 3.6.1 version for some reason. I went back in and checked noticed that I did not have the demoes in the right place moved them, still didn't compile same error. Then I happened to notice another post along a similar line and looked and noticed the 3.6.2 version was stable, so downloaded it copied the directories over to where I had the 3.6.1 version and everything was fine. Humm interesting, to complicated for this amature!

Just also wanted to add, if you want the best information on how to program SilverLight with CSLA the new Video series is the best! I am amazed, I have seen Rocky twice now once in person and now on the Videoes, he is just an excellent teacher!

Mick

 

RockfordLhotka replied on Thursday, May 07, 2009

Yes, it is absolutely true that the videos target 3.6.2.

 

I appreciate the kind words regarding the videos – I’m very glad that you are enjoying them!

 

Rocky

Copyright (c) Marimer LLC