Sometimes ago NUnit extend their framework with a possibility to specify parameters via an attribute and then these parameters are reused by NUnit run-time and the test method is executed several times with different parameters. An example: let’s assume that we have a method that concatenates person first name and person last name.
[...]
In the samples in this blog I’ll use SQL Server 2005 sample database named “AdventureWorks”.
Yes, it is possible. There is a stored procedure (SP) in SQL Server that allows us to see what is the used space, unused space and used space by indexes for a specific table. The name of this SP is sp_spaceused. [...]
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 [...]
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 [...]
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 [...]
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: [...]