Monthly Archives: March 2013

[HowTo] [SQL] Insert data in a column with default value with Linq

Il suffit de jouer avec les paramêtres AutoSync et IsDbGenerated dans les propriétés du champs que l’on veut traiter. il suffit de mettre la valeur AutoSync.OnInsert dans la propriété AutoSync et true dans la valeur IsDbGenenrated Voici plus de détails : [Column( Storage=”_Id”, AutoSync=AutoSync.OnInsert, DbType=”Int NOT NULL IDENTITY”, IsPrimaryKey=true, IsDbGenerated=true )] Ces paramètres sont accessibles […]

[Error] Please install NETCFv35.Messages.EN.wm.cab or NETCFv35.Messages.FR.wm.cab

Damn… I’ve taken some time to find a correct way to handle this… Sometimes, when debugging windows mobile applications, i got the following message : “An error message is available for this exception but cannot be displayed because these messages are optional and are not currently installed on this device. Please install ‘NETCFv35.Messages.EN.wm.cab’ for Windows […]

[HowTo] Linq Count Granchild items from an object with .SelectMany()

Lets say you have the following structure : Product    -> Zone       -> Category          -> Item Meaning a Product has multiple Zones with multiple Categories with multiple Items Lets say we need to select the count of items for each product in a simple distinct list of product. Linq query using .SelectMany() : xyzDataContext dc = […]