While your question is broad, here is the first thing I “wanted to know” when I started working with business applications, but was pretty universal:
Writing business applications is greatly simplified by creating a reliable DAL (level of data access) and abstracting access to data from the rest of your application. Thus, all of your SQL is in one place and not scattered throughout your code.
Some golden ideas for reading in this area are “ORM” (object-relational mapping, since you are using C #, Linq to SQL can be a good place to start) - this maps the database access to the actual classes, If you have a good database design, you may even find that you have very little SQL work.
Another good practice is to use a repository template that effectively encapsulates all data access in one class (at least in the simple case - of course, in large applications that may have several). Then, to access any data, you always go through the repository. This is usually done through an interface that defines the repository, which then allows you to implement several specific implementations. For example, you might want to get your data directly from a SQL server, but later or in an alternative application you can use a web service to retrieve the data instead - you don’t need to rewrite everything, just run a new repository class! The interface remains the same, so the rest of your application knows nothing else: D)
This is a fairly extensive review (and a little bend of the mind), and I'm certainly not an expert, but believe me, good data access methods will certainly make your life easier!
source share