Click here to Skip to main content
15,888,527 members
Articles / Database Development / SQL Server

Overview of XQuiSoft Data Using the Provider Pattern (Open Source)

Rate me:
Please Sign up or sign in to vote.
3.59/5 (12 votes)
16 Jun 2009BSD8 min read 40.7K   28  
A data abstraction layer for .NET applications. Write your application code to be database neutral. Swap out the type of database your application uses without updating or even recompiling your business components.
using System;

using XQuiSoft.Data.Demo;

namespace XQuiSoftDataDemo
{
	/// <summary>
	/// Summary description for EmployeeList.
	/// </summary>
	public class EmployeeList : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.Button addButton;
		protected System.Web.UI.WebControls.HyperLink topHyperLink;
		protected System.Web.UI.WebControls.DataGrid employeeDataGrid;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				EmployeeCollection col = UserState.GetEmployees();
				employeeDataGrid.DataSource = col;
				employeeDataGrid.DataBind();
			}
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.addButton.Click += new System.EventHandler(this.addButton_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void addButton_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("EmployeeEdit.aspx?emp=-1");
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License


Written By
Web Developer Nexul Software LLC
United States United States
Mike has worked in the .Net platform since the beta 2 release of version 1.0. Before that he worked on VB6 windows forms applications automating other applications such as AutoCAD and "Intent".

Mike has released a number of open source applications in javascript and C#.Net. Most of them can be found on github.
github/michael-lang

You can find older .Net open source projects on sourceforge at:
http://sourceforge.net/users/versat1474/

Mike is currently blogging at candordeveloper.com

Comments and Discussions