Tag Archives: C#

Introduction to Code First development with Entity Framework

The Database First approach is interesting when the database already exists. You use Visual Studio and the Entity Framework Designer to generate the C# and VB.NET classes which reflect the existing database model. You may then change relations using the … Continue reading

Posted in .Net, .Net 4.0, ASP.Net, ASP.Net MVC, SQL Server, WPF | Tagged , , , , , , | 4 Comments

How to do concurrency testing in .Net

Concurrency is a property of systems in which several computations are executing simultaneously, and potentially interacting with each other. The computations may be executing on multiple cores in the same chip, preemptively time-shared threads on the same processor, or executed … Continue reading

Posted in .Net, .Net 4.0, Unit Testing | Tagged , , , , , , | 1 Comment

How redirect output from a console application

GUI tools are offers better User experience than command line tools. But in few scenarios we don’t require GUI, like MS Build tasks, and in some cases the application may not have a UI, example: ImageMagik tools. If check codeplex.com, … Continue reading

Posted in .Net, .Net 3.0 / 3.5, .Net 4.0, Windows Forms | Tagged , , , , | 1 Comment

Sortable Binding List for custom data objects

Binding generic collections to Windows forms Data gridview can be done using DataSource property of Gridview control. But the problem with normal generic lists that it doesn’t support sorting, by clicking the grid view headers. .Net Framework provides an generic … Continue reading

Posted in .Net, .Net 3.0 / 3.5, Windows Forms | Tagged , , , , , , | Leave a comment

ArgumentException – This row already belongs to another table

Today one of my colleague got this problem while copying datarow from one table to another, he just want to update few values of a same schema dataTable. So he used following method. He was getting an exception like “This … Continue reading

Posted in .Net, .Net 3.0 / 3.5, .Net 4.0, ASP.Net, Windows Forms | Tagged , , , , , | Leave a comment