data access

15
Project: Data Access library Data access API: ADO.NET Language: C# Developer: Efoe CLUMSON-EKLU This project is the basis for other projects that I’ve completed at SetFocus LLc. It is the data access module that will be reused in the “public library project” a window & web application that help manage books loans and members transactions in a public library. The main objective of this project is to: • Design the Business and Data Access tiers • Develop code that is easily maintainable. • Provide adequate error handling. • Write Stored Procedures on the SQL Server database for the application’s interaction with data. • Use database-programming techniques that provide maximum programming flexibility and control while

Upload: eclumson

Post on 04-Jun-2015

457 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: Data Access

Project: Data Access libraryData access API: ADO.NET Language: C#Developer: Efoe CLUMSON-EKLU

This project is the basis for other projects that I’ve completed at SetFocus LLc. It is the data access module that will be reused in the “public library project” a window & web application that help manage books loans and members transactions in a public library. The main objective of this project is to:• Design the Business and Data Access tiers• Develop code that is easily maintainable.• Provide adequate error handling.• Write Stored Procedures on the SQL Server database for the application’s interaction with data.• Use database-programming techniques that provide maximum programming flexibility and control while minimizing resource utilization

Page 2: Data Access

The Solution.• There are three component projects that make up the

final solution:

- The Entities project: Contains the Items class, Adult and Juvenile member classes that represent the various membership levels. It also has the error code, CustomException classes and a strongly typed dataset that takes « items » from the database.

- The Data Access project: is the actual database logic part of the solution. It has a basic « IDataAccess » interface that is implemented into a « LibraryDataAccess » class where methods take care of interaction with the SQL Server database. On the SQL server database, I created stored procedures that will be called in this layer for all queries.

- The Business Logic project: Contains a class

« LibraryBusiness » that will be used by client applications to build their presentation layers. It contains an instance of the data access layer and makes calls to database interaction methods.

Page 3: Data Access

Sample codes: Entities.Member

Page 4: Data Access

Entities.Member

Page 5: Data Access

Sample codes: Entities.JuvenileMember

Page 6: Data Access

Sample codes: Entities.Item

Page 7: Data Access

Sample codes: Entities.LibraryException

Page 8: Data Access

Sample codes: DataAccess.LibraryDataAcces

Page 9: Data Access

LibraryDataAcces

Page 10: Data Access

Sample codes: Stored Procedures

Page 11: Data Access

Stored Procedures

Page 12: Data Access

Stored Procedures

Page 13: Data Access

Stored Procedures

Page 14: Data Access

Sample codes: BusinessLayer.LibraryBusiness

Page 15: Data Access

The business and data access layers built in this project will help on Later project such as the Windows and Web application versions of the“Public Library” projects. As a reusable module, it saved a great deal of Work reinventing the wheel when creating the clients.On the database side, the stored procedures helped create a robust and More secured application. Overall, this project was a real experience that only made me a betterProgrammer.