Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The only issues I see are</p> <p>(1) this is like reinventing the wheel. There is Enterprise library v5 for FW3.5 and v6 for FW4.5, which has data access components. Use that.</p> <p>With EL you can make a call and have 2,3,4 tables loaded in <code>Dataset</code>. With your method this is not possible, only one at the time.</p> <p>Enterprise library is a complete Data Access suite provided by Microsoft. It takes care of all the little details and all you need is to call your data. This is complete data access layer. And if you look deeper, EL allows for integration of Data and Caching, and other things. But you don't have to use what you don't need. If you need data access you can use only that.</p> <p>And (2) Generally, this is not a good idea to write low level assembly with high-level assembly in reference. Anything <code>System.Web....</code> is UI and client related stuff. In a layered cake design this is like the top of it and Data Access is on the bottom. All references [save for "common"] should travel from bottom to the top and you have it in opposite direction.</p> <p>Look at this picture:</p> <p><img src="https://i.stack.imgur.com/KoNoE.gif" alt="enter image description here"></p> <p>This is from Microsoft. You see the layers of the "cake". All references are going up. What you've done - you took UI-related component and wrote Data Access in it.</p> <p>You can call it opinion-based - but this opinion is standard practice and pattern in software development. Your question is also opinion based. Because you can code everything in single file, single class, and it will work. You can set references to <code>System.Windows.Forms</code> in Asp.net application, if you want to. <strong>Technically, it is possible but it is really bad practice.</strong></p> <p>Your application now have limited reusability. What if you write WPF component or service that need to use same Data Access. You have to drag all <code>System.Web</code> into it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload