Archive for the ‘.net’ Category

I want to share a custom solution that I needed to implement for lifecycle management problem in a long running application, window service. This scenario valid for windows desktop applications and services, actually this solution is applicable for any scenario that you use thread pooling. Tools Let’s first mention about the technologies that this post [...]

Creating a publish folder for web applications is easy, you don’t have to do anything for that, web application project template does it for you. When you working with solutions for more than one project you have deal with different deployable units/packages. I was working on a build script that we need to run in [...]

ASP.NET MVC Model Binders map posted form values to a .NET classes, instead of accepting primitive parameters or form value collection you can accept models/view models as input to your action methods. ASP.NET has a default model binder called DefaultModelBinder. It basically works with most of the .NET types like primitive types, arrays, IList, ICollection [...]

Unit testing is a method to test and determine that each single unit of testable source code behaves exactly as expected. Unit tests isolates the unit that is under test from the remainder of all source code. Only that particular single unit should be executed when unit test invokes a unit to test and makes [...]

I will try to show you a basic feature of ASP.NET MVC, creating custom HTML Helpers. We can reduce the amount of logic in view pages (razor or –aspx- pages) by extracting logic code as method. HTML Helper methods are nothing more than methods that are returning string. If you want to write your [...]

If you are using ReSharper, you know ReSharper can detect inconsistent namings in your code files. That’s a wonderful feature like other ReSharper features. But default settings is not good for test files because I am using a naming standard with underscores and ReSharper warns me for inconsistent name. If you press Alt+Enter ReSharper will [...]

I needed to export some data as CSV file. And I decided to create an action result to return correct format. In my scenario DataTable was the best option to use as a data source. This code snippet shows how to export a DataTable as CSV file. As you know this file format can be [...]

I had presented to computer engineering students at the Eastern Mediterranean University and Cyprus International University about developing SQL Server and ADO.NET on different times.

ScottGu’s announced about VS 2010 and .NET 4 Release Candidate releases. RC will be avaible in February. The goal behind the Release Candidate is to ensure that performance problems in Beta2 are fixed and products are ready for RTM release. ScottGu says this will postpone the RTM release a few weeks. I think every developer [...]