Articles > C#


A basic Database Abstraction Layer

Introduction ... In a previous tutorial, we created an abstract class for basic SCRUD database operations. Today we're going to build on that to create a generic database abstraction layer (DAL). The aim of this is to allow you to connect to any database type without having to worry about changing your Data Layer classes. We're also going to be introducing 2 of the most common design patterns. Factory Singleton First download the previous tutorial source code from here. We'll be creating 2 new classes...

A basic database SCRUD class using abstract and generic modifiers

Introduction ... SCRUD is short for Select, Create, Read, Update and Delete. These are the general actions that any program will perform when working with databases. Yes, there are plenty of ORM applications ( ) out there that can replace this, but as a general introduction to abstract or generic classes and general development I still think this is worth a read. I should also explain why I have used an abstract class instead of an interface....

Make Legacy VB 6 Components Work With .NET Applications

Most IT professionals do not work in state of the art design shops with all the latest developer suites available to them. Many of us have to make older applications and components work with newer technologies.  I found myself in this predicament last year when I was required to make a new ASP.NET (3.5) web application work with a ten year old VB6.0 COM Plus Component. When I suggested to management that I re-write the component, they said:  There’s no time. I know you can make it work. By the way, we need...

Common C# Build-Time Errors Part II: Inheritance and Interfaces

In our last lesson, we saw many of the most basic build-time errors in C#. In this session, we will look at some of the errors related to: classes subclasses inheritance Once we address some of the more common errors we will take a look at how you can fix them. #1 Hidden Method Name Creates Overload ... This conflict arises when a base class and its subclass have a function of the same name public class MyBaseClass { public void Function() { // function code goes here } { public class MySubClass : MyBaseClass...

Common C# Build-Time Errors: Part I

Here’s the situation: You’ve written a program in C#. You’ve checked the flowcharts, examined your coding and developed your user interface. You’re anticipating that everything will flow as smooth as silk. You’re ready to create a build of the program and, instead of seeing a beautiful, efficient result, you get several (often incomprehensible) error message. How did this happen? Here are SOME ways that these errors occur: #1 Undeclared Variables ... C# throws an error message on undeclared...
Home CSS Deals DesignBombs HTML HTML5 JavaScript jQuery Miscellaneous Mobile MySQL News PHP Resources Security Snippet Tools Tutorial Web Development Web Services WordPress