//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using NHibernate template.
// Code is generated on: 22.06.2012 16:57:01
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------

using System;
using System.Collections;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace WithoutResult
{

    /// <summary>
    /// There are no comments for WithoutResult.Department, WithoutResult in the schema.
    /// </summary>
    public partial class Department {

        private int _Id;

        private string _Name;

        private string _Location;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();
        
        #endregion

        public Department()
        {
            OnCreated();
        }

    
        /// <summary>
        /// There are no comments for Id in the schema.
        /// </summary>
        public virtual int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this._Id = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Name in the schema.
        /// </summary>
        public virtual string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this._Name = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Location in the schema.
        /// </summary>
        public virtual string Location
        {
            get
            {
                return this._Location;
            }
            set
            {
                this._Location = value;
            }
        }
    }

}

namespace WithoutResult
{

    public partial class databaseModelMethodsExecutor
    {

        private NHibernate.ISession session;

        public databaseModelMethodsExecutor(NHibernate.ISession session)
        {
          this.session = session;
        }

    
        /// <summary>
        /// There are no comments for InsertDepartment in the schema.
        /// </summary>
        public void InsertDepartment(System.Nullable<int> deptno, string dname, string loc)
        {

            NHibernate.IQuery query = session.GetNamedQuery(@"InsertDepartment");
            query.SetParameter(@"deptno", deptno);
            query.SetParameter(@"dname", dname);
            query.SetParameter(@"loc", loc);
            query.List();
        }

    
        /// <summary>
        /// There are no comments for InsertDepartment in the schema.
        /// </summary>
        public static void InsertDepartment(NHibernate.ISession session, System.Nullable<int> deptno, string dname, string loc)
        {

            NHibernate.IQuery query = session.GetNamedQuery(@"InsertDepartment");
            query.SetParameter(@"deptno", deptno);
            query.SetParameter(@"dname", dname);
            query.SetParameter(@"loc", loc);
            query.List();
        }
    }

}
