Tag: .Net

Manage System.Transaction timeout

When using System.Transaction in .net framework; you may came across a timeout problem where you code needs longer time to run than the default timeout duration for System.Transaction.. this is because the System.Transaction will be aborted after few seconds which will rollback your changes.. to make the timeout longer than the default timeout duration, you Read More …

SOLID Object-Oriented-Design Principles

One of the main principles of OOD (Object Oriented Design) is SOLID principles. SOLID is stands for : 1. Single Responsibility Principle: This means the class has to have one and only one reason to responsibility. This responsibility should be encapsulated by the class. 2. Open/closed principle: The open/closed principle states that software entities (classes, modules, functions, …etc) should be Read More …

Value Injector – How to Use

One of the main tasks that you may face during development is how to translate from one object to another that is very similar in term of properties and attributes. There are many ready to use code to be downloaded from Internet and use. I tried Value Injector DLL; it was good enough for my Read More …

Sync Data Between SQL Server and SQL Azure

couple of weeks ago I had discussion with a friend of mine about cloud technologies form Microsoft. After we finished that discussion I start thinking of what scenarios that we maybe come over while developing a real enterprise application on cloud. One scenario came into mind about that; What if I get into a need Read More …

Performance Troubleshooting (ANTS tool)

it happened once that a client raise an issue regarding to poor performance at certain area on an application that I was working on. That area was working perfectly on my environment, but at their environment it was not like that. I could not duplicate their environment locally because of security restrictions rules we have. Read More …

Parallelism in .Net 4.0

One of the major enhancements that Microsoft has accomplished is enhancing the parallelism in many .Net class library. that is making things much faster and using the hardware in more effective way. in .Net 3.5 and earlier versions of .Net framework, wee have to using Threads to accomplish the same job. Actually .Net 4.0 is Read More …

Loops Performance differences in .Net

I never thought there will be a big different when you use different approaches to iterate through a collection of objects. I knew there are some differences between FOREACH/WHILE/FOR loops, but I never thought the different will be as much as an article I read recently in an article published on codekicks site. The article Read More …

How to Compress Files in .Net

There is many options to compress files, and .net framework provide you with 2 easy ways to do it. Basically there are 2 class under System.IO.Compression namespace. More specifically those classes are:             1. GZipStream             2. DeflateStream Both of these classes has certain usage. I will start first by explaining how to use each Read More …