//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using NHibernate template.
// Code is generated on: 22.06.2012 16:54:17
//
// 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 ComplexTypeResult
{

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

        private string _Name;

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

        public DepartmentType()
        {
            OnCreated();
        }

    
        /// <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 ComplexTypeResult
{

    public partial class databaseModelMethodsExecutor
    {

        private NHibernate.ISession session;

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

    
        /// <summary>
        /// There are no comments for GetDepartments in the schema.
        /// </summary>
        public IList<ComplexTypeResult.DepartmentType> GetDepartments()
        {

            NHibernate.IQuery query = session.GetNamedQuery(@"GetDepartments");
            return query.List<ComplexTypeResult.DepartmentType>();
        }

    
        /// <summary>
        /// There are no comments for GetDepartments in the schema.
        /// </summary>
        public static IList<ComplexTypeResult.DepartmentType> GetDepartments(NHibernate.ISession session)
        {

            NHibernate.IQuery query = session.GetNamedQuery(@"GetDepartments");
            return query.List<ComplexTypeResult.DepartmentType>();
        }

    
        /// <summary>
        /// There are no comments for GetDepartmentsByLocation in the schema.
        /// </summary>
        public IList<ComplexTypeResult.DepartmentType> GetDepartmentsByLocation(string loc)
        {

            NHibernate.IQuery query = session.GetNamedQuery(@"GetDepartmentsByLocation");
            query.SetParameter(@"loc", loc);
            return query.List<ComplexTypeResult.DepartmentType>();
        }

    
        /// <summary>
        /// There are no comments for GetDepartmentsByLocation in the schema.
        /// </summary>
        public static IList<ComplexTypeResult.DepartmentType> GetDepartmentsByLocation(NHibernate.ISession session, string loc)
        {

            NHibernate.IQuery query = session.GetNamedQuery(@"GetDepartmentsByLocation");
            query.SetParameter(@"loc", loc);
            return query.List<ComplexTypeResult.DepartmentType>();
        }
    }

}
