#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace MOH_CRA_XCRMS_Service.Entities.DBEntities
{
	using System.Data.Linq;
	using System.Data.Linq.Mapping;
	using System.Data;
	using System.Collections.Generic;
	using System.Reflection;
	using System.Linq;
	using System.Linq.Expressions;
	using System.ComponentModel;
	using System;
	
	
	[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="MOH_XCRMS_LOG")]
	public partial class dbLogDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    #endregion
		
		public dbLogDataContext() : 
				base(global::System.Configuration.ConfigurationManager.ConnectionStrings["MOH_XCRMS_LOGConnectionString"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public dbLogDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public dbLogDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public dbLogDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public dbLogDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<REQUESTS_V01> REQUESTS_V01s
		{
			get
			{
				return this.GetTable<REQUESTS_V01>();
			}
		}
		
		[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.ADD_REQUESTS_V01")]
		public int ADD_REQUESTS_V01([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ID", DbType="UniqueIdentifier")] System.Nullable<System.Guid> iD, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="USER_HOST", DbType="NVarChar(255)")] string uSER_HOST, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="REQUEST_DATE", DbType="DateTime")] System.Nullable<System.DateTime> rEQUEST_DATE, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PARAMETER", DbType="NVarChar(255)")] string pARAMETER, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="REQUEST_REASON", DbType="NVarChar(512)")] string rEQUEST_REASON, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="ORGANIZATION", DbType="NVarChar(255)")] string oRGANIZATION, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UNIT", DbType="NVarChar(255)")] string uNIT, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="USER_NAME", DbType="NVarChar(255)")] string uSER_NAME, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="METOD_NAME", DbType="NVarChar(255)")] string mETOD_NAME, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="USER_ADDRESS", DbType="NVarChar(255)")] string uSER_ADDRESS, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="USER_AGENT", DbType="NVarChar(255)")] string uSER_AGENT, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="DATA", DbType="VarBinary(MAX)")] System.Data.Linq.Binary dATA, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="DATA_STR", DbType="NVarChar(MAX)")] string dATA_STR)
		{
			IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), iD, uSER_HOST, rEQUEST_DATE, pARAMETER, rEQUEST_REASON, oRGANIZATION, uNIT, uSER_NAME, mETOD_NAME, uSER_ADDRESS, uSER_AGENT, dATA, dATA_STR);
			return ((int)(result.ReturnValue));
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.REQUESTS_V01")]
	public partial class REQUESTS_V01
	{
		
		private System.Guid _ID;
		
		private string _USER_HOST;
		
		private System.DateTime _REQUEST_DATE;
		
		private string _PARAMETER;
		
		private string _REQUEST_REASON;
		
		private string _ORGANIZATION;
		
		private string _UNIT;
		
		private string _USER_NAME;
		
		private string _METOD_NAME;
		
		private string _USER_ADDRESS;
		
		private string _USER_AGENT;
		
		private System.Data.Linq.Binary _DATA;
		
		private System.Nullable<int> _PartMonth;
		
		private string _DATA_STR;
		
		public REQUESTS_V01()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", DbType="UniqueIdentifier NOT NULL")]
		public System.Guid ID
		{
			get
			{
				return this._ID;
			}
			set
			{
				if ((this._ID != value))
				{
					this._ID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_USER_HOST", DbType="NVarChar(255)")]
		public string USER_HOST
		{
			get
			{
				return this._USER_HOST;
			}
			set
			{
				if ((this._USER_HOST != value))
				{
					this._USER_HOST = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_REQUEST_DATE", DbType="DateTime NOT NULL")]
		public System.DateTime REQUEST_DATE
		{
			get
			{
				return this._REQUEST_DATE;
			}
			set
			{
				if ((this._REQUEST_DATE != value))
				{
					this._REQUEST_DATE = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PARAMETER", DbType="NVarChar(255)")]
		public string PARAMETER
		{
			get
			{
				return this._PARAMETER;
			}
			set
			{
				if ((this._PARAMETER != value))
				{
					this._PARAMETER = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_REQUEST_REASON", DbType="NVarChar(512)")]
		public string REQUEST_REASON
		{
			get
			{
				return this._REQUEST_REASON;
			}
			set
			{
				if ((this._REQUEST_REASON != value))
				{
					this._REQUEST_REASON = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ORGANIZATION", DbType="NVarChar(255)")]
		public string ORGANIZATION
		{
			get
			{
				return this._ORGANIZATION;
			}
			set
			{
				if ((this._ORGANIZATION != value))
				{
					this._ORGANIZATION = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UNIT", DbType="NVarChar(255)")]
		public string UNIT
		{
			get
			{
				return this._UNIT;
			}
			set
			{
				if ((this._UNIT != value))
				{
					this._UNIT = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_USER_NAME", DbType="NVarChar(255)")]
		public string USER_NAME
		{
			get
			{
				return this._USER_NAME;
			}
			set
			{
				if ((this._USER_NAME != value))
				{
					this._USER_NAME = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_METOD_NAME", DbType="NVarChar(255)")]
		public string METOD_NAME
		{
			get
			{
				return this._METOD_NAME;
			}
			set
			{
				if ((this._METOD_NAME != value))
				{
					this._METOD_NAME = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_USER_ADDRESS", DbType="NVarChar(255)")]
		public string USER_ADDRESS
		{
			get
			{
				return this._USER_ADDRESS;
			}
			set
			{
				if ((this._USER_ADDRESS != value))
				{
					this._USER_ADDRESS = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_USER_AGENT", DbType="NVarChar(255)")]
		public string USER_AGENT
		{
			get
			{
				return this._USER_AGENT;
			}
			set
			{
				if ((this._USER_AGENT != value))
				{
					this._USER_AGENT = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DATA", DbType="VarBinary(MAX)", UpdateCheck=UpdateCheck.Never)]
		public System.Data.Linq.Binary DATA
		{
			get
			{
				return this._DATA;
			}
			set
			{
				if ((this._DATA != value))
				{
					this._DATA = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PartMonth", AutoSync=AutoSync.Always, DbType="Int", IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
		public System.Nullable<int> PartMonth
		{
			get
			{
				return this._PartMonth;
			}
			set
			{
				if ((this._PartMonth != value))
				{
					this._PartMonth = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DATA_STR", DbType="NVarChar(MAX)")]
		public string DATA_STR
		{
			get
			{
				return this._DATA_STR;
			}
			set
			{
				if ((this._DATA_STR != value))
				{
					this._DATA_STR = value;
				}
			}
		}
	}
}
#pragma warning restore 1591
