Timeline for .NET Why should I use DAL over direct database access
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 19, 2015 at 10:56 | comment | added | Jammer | Excellent, glad to hear it. Make sure you only directly interact in your classes using an interface extracted from your DAL classes, the consuming code shouldn't know or care about any implementation details. All it cares about is "give a list of these users", how they are fetched is irrelevant. Glad it helped. | |
| May 19, 2015 at 10:48 | vote | accept | pzaj | ||
| May 19, 2015 at 10:48 | comment | added | pzaj | Yeah, I thought so, by "wrapper" I meant DBManager class, it's implemented differently and is not DBMS independent, but yeah, that's basically what I'm using, just even more "wrapped" (limited only to SPs). Thanks for clarification, I believe I'm on a right way :) | |
| May 19, 2015 at 10:40 | comment | added | Jammer | aspalliance.com/837_implementing_a_data_access_layer_in_c | |
| May 19, 2015 at 10:31 | comment | added | pzaj | Well, would you mind pointing me to an example implementation of DAL? Because I quite struggle to figure out how to implement it the way the code is not spread all around the code. | |
| May 19, 2015 at 9:12 | comment | added | Jammer | Simply wrapping the SqlClient still leaves DAL code littered around the codebase which isn't a good practice. | |
| May 19, 2015 at 9:11 | comment | added | Jammer | WCF is overkill if the app and client are on the same workstation. All Database interaction should be a DAL project. Then use a different connection string depending on the location of the database to connect to (local/remote) if it's all on a LAN. | |
| May 19, 2015 at 8:07 | comment | added | pzaj | Well, I've been told I should definitely use WCF, but I find it too much overhead to only communicate with database. I do use a wrapper around SqlClient class to create a single entry point for all database communication (I only use Stored Procedures). Do you believe I should change the approach and use a n-tier architecture? | |
| May 19, 2015 at 8:00 | review | First posts | |||
| May 19, 2015 at 13:33 | |||||
| May 19, 2015 at 7:58 | history | answered | Jammer | CC BY-SA 3.0 |