Franc Stratton's .NET (TM) Web Application, OOP, and SOA Architecture & Programming Site

A site devoted to ASP.NET (TM), SilverLight (TM) and Browser-Based WPF (TM) Applications, IIS Services, and OOP Architectures

Home     .NET Security     Standards     Data Store     Windows Form Apps     WF/WCF/WPF     jQuery     C# Developer Corner     Java Development     Site Map      
Architecture Overview
N-Tier Architecture
Service Oriented Architecture
SOA Virtualization
Base Classes
BLL
DAL
Base Page
DALFactory
IDAL
Email
Application
Contact Us
Business Entities
IDAL Class
 
This class is the interface class for the DAL and DALFactory.
 

namespace Sample.AppBase

{

#region Class Using References

using System;

using System.Data;

using System.Data.Odbc;

using System.Data.SqlClient;

using System.Data.OleDb;

//using System.Data.OracleClient;

#endregion Class Using References

///---------------------------------------------------------------------------

/// Namespace: Sample.AppBase

/// Derived Class:

/// Filename: IDAL.cs

/// Date: 04/28/2008

/// Author: Sample Team

/// Updated:

/// <summary>

/// Purpose: Contains the Interface from which the DAL class is derived.

/// </summary>

///---------------------------------------------------------------------------

#region Enum Section

public enum DataProvider

{

Oracle,SqlServer,OleDb,Odbc

}

#endregion Class Using References

public interface IDAL

{

#region Private and Public Fields and Properties

DataProvider ProviderType {get; set;}

string ConnectionString {get; set;}

IDbConnection Connection {get;}

IDbTransaction Transaction {get;}

IDataReader DataReader {get;}

IDbCommand Command {get;}

IDbDataParameter[]Parameters {get;}

#endregion Private and Public Fields and Properties

#region Methods Required in classes that implements this interface

void Open();

void BeginTransaction();

void CommitTransaction();

void CreateParameters(int paramsCount);

void AddParameters(int index, string paramName, object objValue);

IDataReader ExecuteReader(CommandType commandType, string

commandText);

DataSet ExecuteDataSet(CommandType commandType, string

commandText);

object ExecuteScalar(CommandType commandType, string commandText);

int ExecuteNonQuery(CommandType commandType,string commandText);

void CloseReader();

void Close();

void Dispose();

#endregion Methods Required in classes that implements this interface

}

}