Tuesday, April 27, 2010

Viva Pinata Stratergy

Prompt Tricks Javascript on Submit a Form

Without resorting to the plugin to display MessageBox in jQuery. The JavaScript language is already possible to use the confirm (), an analog of Alert, which presents the user with the ability to choose between OK and Cancel and return value of true / false accordingly.

The function can be used directly in html.

input type = "image" src = "delete_16x16.gif"
onclick = "return confirm ('Proceed with the cancellation ?');"
title =' Delete '


Monday, April 19, 2010

How To Size Minnetonka Moccasins

asp.net mvc EditorFor 2: Customizing the date format


Using the extension of Html.EditorFor asp.net mvc2 you lose control of the formatting, also indicate clearly the date formatting, it is always displayed in expanded form.

here as resolve the problem by using a feature of the framework: a template editor ad hoc.

Monday, April 12, 2010

Chest Infection Infection Time

Entity Framework - Can not be specified Condition

pending the official release of VS2010, you have to deal with a bug in the RC version on to the entity framework.

Case: a nullable field of the main table refers to a secondary table. The primary key of the secondary table is of type identity (autogerata). Entity Framework wrongly branded as autogerata ( StoreGeneratedPattern = "Identity" ) the ownership of the main table.

link to vote for the bug on Microsoft Connect and a workaround. In short, the workaround

is to remove the specification ( StoreGeneratedPattern = "Identity" ) for fields prosecuted (listing the xml you can edit directly in visual studio: right click on the file. edmx in the solution explorer and then "edit xml").





Thursday, April 8, 2010

Lego Gear For Indyana Jones

Linq Entity Framework

Linq2Sql is an excellent class generator for our DataLayer. Anyway, time to take the next step.




SQL Server Profiler for SQL Server Express (an opensource project).

How Can I Tell What Year My Burton Snowboard Is?

limits: more fields in a table refer to the same lookup table


tabellaX If one has more fields connected by foreign key relationship to a single lookup tabellaY Linq2Sql generate for classeX (mapping tabellaX) a property for each foreign key.

tabellaY1
tabellaY2
tabellaY etc ...

the alternator are:
  • remember the meaning of each foreign key, according to their order
  • do a renaming of the property on the class generated by LINQ (except to do the same procedure every time drag-drop the table the linq designer)