Code Snippet Details

<- Back to List


Language
C#.Net
Description
IDataProvider
Code
using System.Data; namespace Alphabet.Framework.DAL { /// <summary> /// Interface class for Data Provider classes - specifies the interface that similar classes must adhere to. /// </summary> /// <remarks>Note that the command object is a generic IDbCommand interface type rather than a specific SQL, OleDB or other type of command.</remarks> public interface IDataProvider { DataTable GetDataTable(string sql); DataTable GetDataTable(GenericCommand genericCommand); int ExecuteStoredProcedure(ref GenericCommand genericCommand); int ExecuteStoredProcedure(string sql); object GetScalarValue(GenericCommand genericCommand); object GetScalarValue(string sql); void OpenConnection(); void CloseConnection(); void BeginTransaction(); void RollbackTransaction(); void CommitTransaction(); } }