Feeds:
Posts
Comments

Posts Tagged ‘update’

Dear all,

With LightSwitch, currently you can consume different data source types:

 

  • Database
  • SharePoint
  • WCF RIA Service

So far, so good. Upon a fresh installation, I set up a custom list. The goal was to consume the SP2010 list in a LightSwitch Application, as a data source. Using the Add Data Source wizard, I came until I entered the server address and my credentials on the server. Then, the Choose Your SharePoint Items window issued a message like:

 

image

 

With the small but all-telling message that what we need is a running SP2010 with the WCF Data Services installed. Obviously, I didn’t have this installed, so I went to install (as recommended) the CTP2 of the ADO.NET Data Services v1.5. In the good hope that it would work now, I tried again – but not a chance. I tried also to access the data services via browser, but this way it would issue only the following message:

 

image

 

Again, not a chance. So, I went for installing the following:

 

ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2

 

Since I am running Windows Server 2008 R2 on my VM, I took the choice above. If however you are running a different OS than the ones mentioned above, you might want to have a look at the following link:

 

ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 2000, Windows Server 2003, Windows XP, Windows Vista and Windows Server 2008

 

And here we went! Adding a datasource using LightSwitch, I got the a list of all available SP lists, as expected, and could add them as a datasource. One more thing that was bothering: When defining a custom list, specifying a column of type

 

Number

 

Then LightSwitch Beta1 will import this list as a table where the column of type Number is always of type Double. Also, changing the list column type to number with 0 decimals won’t change this behaviour. Obviously, if then we try to create relationships in LightSwitch with tables from other data sources, we have a problem. I hope there exists a workaround for this not-so-much-desirable behavior.

Important notice: Before installing the above mentioned ADO.NET Data Services Update, please consider that the server will need to be restarted for the changes to take effect!

If you install the data services AFTER your SP2010 installation, then you might also to run the iisreset command. Of course, running all the installations and commands mentioned require attention and contain potential harms that are to be carried out at your own risk.

 

I wish you happy Lightswitching and SharePointing till the next time! 😉

 

Best regards,

Martin

Advertisements

Read Full Post »

Howdy,

In reference to my previous post, Pex: Parametrized Unit Tests and their Customization, I’d like to publish an update:

I received an interesting comment by Peli, that the following code piece should be replaced by a lambda expression, in order to make it more readable. Hence, I’d advice that you should just replace the following snippet:

  28:                 DeliverToAddressStringBook =
  29:                 delegate(String address, Book book)
  30:                 {
  31:                     count++;
  32:                 }
  

with the following:  

 

28:    DeliverToAddressStringBook = (address, book) => count++;

 

And in fact, using the lambda expression we could reduce the amount of code, hence making it more readable! Thanks, Peli!

Best regards,

Martin

Read Full Post »