By default, the entity framework works on a lazy load mode. this means that, if you want to load a reference, you must do it explicitly.
Imagine the scenario:

Linq example
Normally, when we make a linq query to get all the Person we would do:
Entities entities = new Entities(); var persons = from Person p in entities.Person select p;
but in this scenario, if we wanted the books, we have to explicitly load then:
foreach(Person p in persons){
p.Book.Load();
//Handle the books
}
This would do a query for each person just to retrieve the books.
But you can explicitly load the books right in the query:
Entities entities = new Entities();
var persons = from Person p in entities.Person.Include("Book")
select p;
this would allow you to load all the books from all the persons. This is called eager loading.
If you want to retrive all the persons and all the books and all the pages of those books, the query would be:
Entities entities = new Entities();
var persons = from Person p in entities.Person.Include("Book.Page")
select p;
It’s been a while since i posted something in my blog (2 months actually). Shame on me!!!
But it has been 2 crazy months:
- First Orion’s Belt little marketing campaign (ok almost a spread a word thing) in the main Browser MMO Sites and several bug corrections. With all the “spread the word” and without spending a cent, we already have +4000 players. Our objective is to achieve the 10000 until the end of the year without spending money. By the way things are going, we think is possible.
- New project in the area of security and defense has kept me pretty occupied. Classified sorry. The only thing i can say is that is being made using Managed C++ and C#.
- Girlfriend - ok this part was implicit, but in the last few months the time spent with her has increased almost 60%. So i think is time to start looking for a house.
And today is my last day of work. Tomorrow is vacation time! 11 days of deserved vacations without thinking in a line of code. The destiny: 5 days at South of Spain and 6 days somewhere (dunno…yet!).
I’ll post some pictures when i return (hopefully pictures taken with my new acquisition, a Cannon EOS 500D (if it arrives on time… saying TODAY!).
Didn’t know that microsoft had entered in the comedy business…
But, checking the page below i think they might actually trying to enter that market:
http://www.microsoft.com/windows/internet-explorer/get-the-facts/browser-comparison.aspx
For many, wolfram alpha is the search application that can overthrone google. It does not give you a series of web sites where you can find the information that you are searching. Instead it tries to give you the exact information that you are searching.
Confused? try it: http://www36.wolframalpha.com
If you insert a word like milk the search box will give you detailed information about milk
cool, isn’t it?
It’s very incomplete but it is certainly a very good concept. Maybe google will buy it and merge it with its search tool.
If i worked in a place like this, i would be in heaven:




And the best of them all:

Pictures Taken from Blizzard’s official website.
Protype is a game that will be released in PS3, XBOX and PC. It´s a single player game, third person and based on an open world. It centers around Alex Mercer, a guy infected by a deadly virus that gave him special shape shifting powers.
Here is the opening cinematic:
Here is the direct link to amazon page:
Today i found in youtube some videos about inventions, inventions that can be the next big thing of tomorrow. Here are 2 of them that i loved:
Want more? Visit their official website: http://www.ted.com/

Insert Coin, a program about games that airs on AXN will feature an interview with all the members of the team that is developing the game made by the host, Filipa Brazona (very nice by the way).
If you are in Portugal, the episode (517) will air on the following days:
| 25-04-2009 | AXN |
15:02 - Insert Coin |
| 26-04-2009 | AXN |
10:20 - Insert Coin |
| 26-04-2009 | AXN |
17:05 - Insert Coin Insert Coin (5): Ep 517 |
| 27-04-2009 | AXN |
02:05 - Insert Coin |
| 27-04-2009 | AXN |
06:26 - Insert Coin |
| 28-04-2009 | AXN |
05:50 - Insert Coin |
Today i was helping Pre finishing our Screenshot and Art Work page of Orion’s Belt.
One of the thinks i wanted to add was a frame to the thumbnail pictures, but i didn’t want to add that frame to the image itself.
I saw this kind of thing done in the StartCraft 2 Artwork page. I inspected the code but didn’t like what i saw.
They basically have 2 divs ( with styles inline
… bahhh!!!), anchor and a image (all by this order).
Their strategy was to associate a thumbnail image with a style and in the end insert the frame as the final element, the top most, something like this:
<div style='ThumbnailImage'>
<div style='some image to give some effect'>
<a href='Place to see the image in a good size'>
<img src='a transparent with Frame'/>
</a>
</div>
</div>
Problems with this solution? The only problem i see is that you are obligated to have the style inline or you have to add a list of all the thumbnails to your css file, and have a map… ok, no..
If you have a thumbnail image:
<a href='Place to see the image in a good size'>
<img src='ThumbNail Image'/>
</a>
and you want to put a frame on to it, simply insert a div before your image. This div will contain your frame:
<a href='Place to see the image in a good size'>
<div class='frame'></div>
<img src='ThumbNail Image'/>
</a>
the css style is also very simple:
.frame{
width:XXXpx; /*Width of the thumbnail*/
height:XXXpx; /*Heightof the thumbnail*/
background:url(ThumbnailFrame.png);
position:absolute;
}
img{
margin:Wpx
}
Notice that i added a margin to the image? This is just to center the image in the frame.
You can see the result of this example in the Screenshot and Art Work page of Orion’s Belt.
God of War has always been one off my favorite games. It has a je ne se quois. Bot GOW I and II are Beautiful.
Now the cinematic trailer of GOW III Makes me think. Will they be able to surpass the other 2 predecessors???
Trailer after the break.