Click here to Skip to main content
15,949,741 members

Comments by Pascen (Top 2 by date)

Pascen 21-Jun-13 5:44am View    
Reason for my vote of 1 \n I actually didn't want to write a comment, but after you gave yourself a five for this, I just had to.

The "positive" aspect first: You managed to violate pretty much every design principle and good practice I can think of in less than 100 lines of code. That's actually quite an achievement...

Seriously, what's the purpose of this? If you're too lazy to write proper stored procedures, why write them at all? It would be a far better solution to not use stored procedures than in such a wrong and bad way. And even worse, the same applies to your exception handling. Obviously you don't even understand the basics of it. This code does not solve a single problem, it just creates a lot of them. Sorry to say that, but my company has fired developers for quality less bad than this.
Pascen 14-Jan-13 16:55pm View    
Reason for my vote of 2 \n Thanks for the article Kundan. But I have to disagree with the title. This is by far not the best way to use Entity Framework. The code is very tightly coupled. How do you unit test this code for example? You should have a look at IOC and SOLID principles and please stop misusing the static keyword like that.

You mentioned in the introduction that you also use MVC. Good OO design and the ability to unit test is one of the main reasons to use MVC IMO.