Entity Framework and Base Entity class

Entity Framework does great job with taking care of entities changes and entities collection internally. And its uses almost plain POCO objects. Almost because collections of dependents data like in 1 to many tables relationship needs virtual keyword. Its understandable since EF needs to track what happens to collection. For instance lets have 2 tables: Customer and dependent Order.

Continue reading “Entity Framework and Base Entity class”

Ninject and Entity Framework

Last time I wrote about problem with testing Entity Framework in Visual Studio 2012. During working on this project I also encounter problems with configuration of Ninject to allow injecting Entity Framework classes from its Patterns extension. To be frankly this was not much a problem then lack of documentation. I just was forced to experiment with Ninject and new-thing-for-me Entity Framework Patterns extension. Continue reading “Ninject and Entity Framework”

Entity Framework Patterns extension and Unit Test in Visual Studio 2012

Yesterday I was trying to make work simple test class in VS2012. I did not know what was wrong exactly. It was first project when I tried to glue together Entity Framework with repository pattern and Ninject as IoC container. Because of the fact that this was first time for solution like that I was sure that it is me, or rather source of my problem was indeed my code. But let’s not skip ahead. Continue reading “Entity Framework Patterns extension and Unit Test in Visual Studio 2012”

Line in WebGL and why you gonna do this on your own.

WebGL as method for generating 3D graphic in browser and it is pretty powerful. You can do really awesome things with this, like porting Quake 2 to JavaScript or creating model of human body. But all of this 3D object are complex collection of hundreds or thousands triangles. What if you just want to draw a simple thin line? Luckily OpenES have support for that. So it is possible. Lets see how to do that. Continue reading “Line in WebGL and why you gonna do this on your own.”

Cartezian coordinate system in HTML 5 canvas

Normally canvas 2D context is using custom coordinate transform where Y coordinates are flipped vertically. Here is image with example (taken from http://diveintohtml5.info/canvas.html; it is great book and you should read it 🙂 )

It is a bit inconvenient to use if you are drawing some shapes with points given in classic Cartezian coordinate system. Continue reading “Cartezian coordinate system in HTML 5 canvas”