Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Wednesday, 18 September 2013

Cascading Deletions in Entity Framework

Model_thumb6Imagine that there is the model shown on the picture. You want to delete an entity of type “Specification”. There is an option called “Cascading” that can be defined under the corresponding relation between two database entries. When Cascading is on, all you need to do is simply delete the parent object. Cascading takes care of the rest, which means that it automatically clears out all related child objects.
The code that is needed comes below:


Friday, 8 March 2013

A simple Snake Game Tutorial in C# and WPF


Introduction


My effort is to try and explain some basic concepts of programming based on really simple words and examples. This article has been posted also on codeproject

Background

The main idea behind a snake game (as in most such games)  is to "fool" the user into thinking that a series of frames is in reality a moving object. Such a concept is fabricated in my implementation. The "motion" effect is based on a series of  Timer events, each of which is "ticking" among specific intervals. The head of the snake is being drawn on a new position slightly misplaced to the direction of motion. The end of its tail is erased from our canvas, thus creating an illusion of motion.