Click here to Skip to main content
15,897,371 members
Articles / Database Development / SQL Server

Tier Generator 1.0

Rate me:
Please Sign up or sign in to vote.
4.89/5 (140 votes)
26 Jul 2008CPOL2 min read 256.7K   13.3K   297  
A powerful tool for rapid application development.
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace TierGenerator.Common
{
    /// <summary>
    /// class to contain to Data base schema
    /// </summary>
    public class Database
    {
        #region Data members

        private string _databaseServer = string.Empty;
        private string _catalog = string.Empty;
        private string _connectionString = string.Empty;
        private List<DatabaseTable> _tables = null;

        #endregion

        #region Properties

        /// <summary>
        /// get/set the name of the Database
        /// </summary>
        public string DatabaseServer
        {
            get { return _databaseServer; }
            set { _databaseServer = value; }
        }

        /// <summary>
        /// get/set the catalog name
        /// </summary>
        public string Catalog
        {
            get { return _catalog; }
            set { _catalog = value; }
        }

        /// <summary>
        /// get/set the connection string
        /// </summary>
        public string ConnectionString
        {
            get { return _connectionString; }
            set { _connectionString = value; }
        }

        /// <summary>
        /// Get the collection of the Tables that belongs to this database
        /// </summary>
        public List<DatabaseTable> Tables
        {            
            get {
                
                if (_tables == null)
                    _tables = new List<DatabaseTable>();
                return _tables; 
            }
        }

        #endregion

    }
}

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 Code Project Open License (CPOL)


Written By
Chief Technology Officer
Pakistan Pakistan
Passion and positive dedication is essential part of success. I believe on hardworking and sharing knowledge with others. I always try to be a better than I am and think positive for positive result.

My Blogs

My Linked-In Profile

Comments and Discussions