Saturday, July 31, 2010

Translate<T> method in ObjectContext in Entity Framework 4

In Entity Framework 4, ObjectContext has a nice Translate<T> method. This method will materialize the result type. It takes your DbDataReader and materializes the data back into entities, the T can be a primitive type, an entity type, or any custom type you like, That type does not have to be defined in the Entity Framework conceptual model.

LINQ Join in Entity Framework 4

I want to explain a simple linq join in entity framework 4.

Thursday, July 29, 2010

How to install the latest Flex SDK into Flex builder 3

Installing the latest flex SDK into flex builder 3 is pretty simple. after you download the new version of SDK from Adobe website, then unzip that zip file and copy the content to a new folder created on a location
like C:\Program Files\Adobe\Flex Builder 3\sdks or any location you like, But I prefer that location.
From the main menu, select Window > Preferences > Flex > Installed SDKs and click Add to add a your new sdk and you can select the default SDK you want Flex builder to use to compile your program.
Cheers!

Wednesday, July 28, 2010

How to get only date part in T-sql DateTime

SELECT DATEADD(D, 0, DATEDIFF(D, 0, GETDATE()))

OR

SELECT CONVERT(DATETIME, FLOOR( CONVERT(FLOAT, GETDATE())))