Archive for the '.Net' Category

{"Server-generated keys and server-generated values are not supported by SQL Server Compact."}

Sunday, November 22nd, 2009

I’m creating a small application for my friends and I decided to use SQL CE and Entity Framework. I’ve configured the database to use identities for primary keys in tables and I got an exception when I’ve tried to add a record.
According to information from internet Entity Framework doesn’t support database generated values. It [...]

XmlConverter performance improvement

Thursday, August 6th, 2009

Last year I wrote a post about how to serialize and desterilize objects to/from XML using standard .Net Framework classes (see this post).  Yesterday, I need to use the class but I need to improve the performance. When one creates XmlSerializer class many time is spend to configure it behind the scene. After its initialization [...]

Think twice before to implement some idea – # 1

Thursday, July 9th, 2009

I’ve already written some posts that show some source code that can be rewritten in a different way and this way to achieve better performance. Now I will open a series with a topic of this post with a number and I’ll post different samples of implementations that I’ll run into and I’ll do some [...]

is operator + object casting or as operator + null comparison?

Saturday, June 27th, 2009

This week I found in the source code of one of our projects that people use “is” operator + object casting in places that they can use “as” operator + null comparison.

1: // "is" operator + object casting

2: if (myObj is MyObject)

3: {

4: [...]

Windows Installer vs. ClickOnce Deployment

Monday, March 16th, 2009

Today, one of the developers in our teams asked me does it possible to use custom actions in ClickOnce. I’ve never thought about this before and I googled a bit. I found a nice article in MSDN. It briefly describes both technologies and the beginning and you can get an overview of them. Further, it [...]

Compile and deploy an application using aspnet_compiler

Tuesday, February 3rd, 2009

I’d a need to compile and to deploy a compiled version of an ASP.Net web site to a directory that the web site is published. For this purpose, I’ve decided to use an utility from .Net Framework 2.0 named aspnet_compiler.exe. It is located in <windows_directory>\Microsoft.NET\Framework\ v2.0.50727. The advantage of using it is that I can [...]