15,949,741 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.