Naethra D avatar Naethra D committed 326c208

Code : DataUp Admin WebService

Comments (0)

Files changed (179)

WebService/.nuget/NuGet.Config

+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <solution>
+    <add key="disableSourceControlIntegration" value="true" />
+  </solution>
+</configuration>

WebService/.nuget/NuGet.targets

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <PropertyGroup>
+        <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+        
+        <!-- Enable the restore command to run before builds -->
+        <RestorePackages Condition="  '$(RestorePackages)' == '' ">false</RestorePackages>
+
+        <!-- Property that enables building a package from a project -->
+        <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
+        
+        <!-- Download NuGet.exe if it does not already exist -->
+        <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+    </PropertyGroup>
+    
+    <ItemGroup Condition=" '$(PackageSources)' == '' ">
+        <!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
+        <!--
+            <PackageSource Include="https://nuget.org/api/v2/" />
+            <PackageSource Include="https://my-nuget-source/nuget/" />
+        -->
+    </ItemGroup>
+
+    <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
+        <!-- Windows specific commands -->
+        <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+        <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
+        <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
+    </PropertyGroup>
+    
+    <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
+        <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
+        <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
+        <PackagesConfig>packages.config</PackagesConfig>
+        <PackagesDir>$(SolutionDir)packages</PackagesDir>
+    </PropertyGroup>
+    
+    <PropertyGroup>
+        <!-- NuGet command -->
+        <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
+        <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
+        
+        <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
+        <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
+
+        <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+        <!-- Commands -->
+        <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" -o "$(PackagesDir)"</RestoreCommand>
+        <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
+
+        <!-- Make the build depend on restore packages -->
+        <BuildDependsOn Condition="$(RestorePackages) == 'true'">
+            RestorePackages;
+            $(BuildDependsOn);
+        </BuildDependsOn>
+
+        <!-- Make the build depend on restore packages -->
+        <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+            $(BuildDependsOn);
+            BuildPackage;
+        </BuildDependsOn>
+    </PropertyGroup>
+
+    <Target Name="CheckPrerequisites">
+        <!-- Raise an error if we're unable to locate nuget.exe  -->
+        <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+        <SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
+        <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')"  />
+    </Target>
+
+    <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+        <Exec Command="$(RestoreCommand)"
+              Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
+              
+        <Exec Command="$(RestoreCommand)"
+              LogStandardErrorAsError="true"
+              Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
+    </Target>
+
+    <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+        <Exec Command="$(BuildCommand)" 
+              Condition=" '$(OS)' != 'Windows_NT' " />
+              
+        <Exec Command="$(BuildCommand)"
+              LogStandardErrorAsError="true"
+              Condition=" '$(OS)' == 'Windows_NT' " />
+    </Target>
+    
+    <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+        <ParameterGroup>
+            <OutputFilename ParameterType="System.String" Required="true" />
+        </ParameterGroup>
+        <Task>
+            <Reference Include="System.Core" />
+            <Using Namespace="System" />
+            <Using Namespace="System.IO" />
+            <Using Namespace="System.Net" />
+            <Using Namespace="Microsoft.Build.Framework" />
+            <Using Namespace="Microsoft.Build.Utilities" />
+            <Code Type="Fragment" Language="cs">
+                <![CDATA[
+                try {
+                    OutputFilename = Path.GetFullPath(OutputFilename);
+
+                    Log.LogMessage("Downloading latest version of NuGet.exe...");
+                    WebClient webClient = new WebClient();
+                    webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
+
+                    return true;
+                }
+                catch (Exception ex) {
+                    Log.LogErrorFromException(ex);
+                    return false;
+                }
+            ]]>
+            </Code>
+        </Task>
+    </UsingTask>
+    
+     <UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+        <ParameterGroup>
+            <EnvKey ParameterType="System.String" Required="true" />
+            <EnvValue ParameterType="System.String" Required="true" />
+        </ParameterGroup>
+        <Task>
+            <Using Namespace="System" />
+            <Code Type="Fragment" Language="cs">
+                <![CDATA[
+                try {
+                    Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
+                }
+                catch  {
+                }
+            ]]>
+            </Code>
+        </Task>
+    </UsingTask>
+</Project>
Add a comment to this file

WebService/.nuget/nuget.exe

Binary file added.

WebService/AdminServiceDatabase/AdminServiceDatabase.sqlproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Name>AdminServiceDatabase</Name>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectVersion>4.0</ProjectVersion>
+    <ProjectGuid>{2d985e96-ed12-4878-8a49-9c467e09c33a}</ProjectGuid>
+    <DSP>Microsoft.Data.Tools.Schema.Sql.SqlAzureDatabaseSchemaProvider</DSP>
+    <ShowWizard>False</ShowWizard>
+    <OutputType>Database</OutputType>
+    <RootPath>
+    </RootPath>
+    <RootNamespace>AdminServiceDatabase</RootNamespace>
+    <AssemblyName>AdminServiceDatabase</AssemblyName>
+    <IncludeSchemaNameInFileName>False</IncludeSchemaNameInFileName>
+    <GenerateDatabaseFile>False</GenerateDatabaseFile>
+    <GenerateCreateScript>False</GenerateCreateScript>
+    <ModelCollation>1033,CI</ModelCollation>
+    <DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
+    <DeployToDatabase>True</DeployToDatabase>
+    <DeployToDatabaseAddToServerExplorer>True</DeployToDatabaseAddToServerExplorer>
+    <LoadSqlClrTypes>True</LoadSqlClrTypes>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetLanguage>CS</TargetLanguage>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <DefaultSchema>dbo</DefaultSchema>
+    <PreviousProjectVersion>4.0</PreviousProjectVersion>
+    <DefaultCollation>SQL_Latin1_General_CP1_CI_AS</DefaultCollation>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
+    <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
+    <SuppressWarnings>
+    </SuppressWarnings>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <TargetConnectionString>
+    </TargetConnectionString>
+    <TargetDatabase>
+    </TargetDatabase>
+    <SqlServerVerification>True</SqlServerVerification>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <SuppressWarnings>
+    </SuppressWarnings>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <TargetConnectionString>
+    </TargetConnectionString>
+    <TargetDatabase>
+    </TargetDatabase>
+    <SqlServerVerification>True</SqlServerVerification>
+  </PropertyGroup>
+  <!-- VS10 without SP1 will not have VisualStudioVersion set, so do that here -->
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
+  <ItemGroup>
+    <Folder Include="Properties" />
+    <Folder Include="dbo\" />
+    <Folder Include="dbo\Tables\" />
+    <Folder Include="dbo\Scripts" />
+  </ItemGroup>
+  <ItemGroup>
+    <BuildContributorArgument Include="OutDir=$(OutDir)" />
+  </ItemGroup>
+  <ItemGroup>
+    <Build Include="dbo\Tables\AdminUser.sql" />
+    <Build Include="dbo\Tables\RepositoryType.sql" />
+    <Build Include="dbo\Tables\RepositoryDetails.sql" />
+  </ItemGroup>
+  <ItemGroup>
+    <PostDeploy Include="dbo\Scripts\insert.master.sql" />
+  </ItemGroup>
+</Project>

WebService/AdminServiceDatabase/dbo/Scripts/insert.master.sql

+INSERT INTO [dbo].[RepositoryType] ([RepositoryTypeId] ,[RepositoryType] ,[PasswordRequired]) VALUES (1 ,'ONEShare', 0)
+INSERT INTO [dbo].[RepositoryType] ([RepositoryTypeId] ,[RepositoryType] ,[PasswordRequired]) VALUES (2 ,'DataONE', 1)
+
+INSERT INTO [dbo].[AdminUser]([UserName] ,[Password] ,[IsActive] ,[LastModified]) VALUES ('dataupadmin1' ,'dataupadmin1' ,1 ,null)
+INSERT INTO [dbo].[AdminUser]([UserName] ,[Password] ,[IsActive] ,[LastModified]) VALUES ('dataupadmin2' ,'dataupadmin2' ,1 ,null)
+INSERT INTO [dbo].[AdminUser]([UserName] ,[Password] ,[IsActive] ,[LastModified]) VALUES ('dataupadmin3' ,'dataupadmin3' ,1 ,null)
+INSERT INTO [dbo].[AdminUser]([UserName] ,[Password] ,[IsActive] ,[LastModified]) VALUES ('dataupadmin4' ,'dataupadmin4' ,1 ,null)
+INSERT INTO [dbo].[AdminUser]([UserName] ,[Password] ,[IsActive] ,[LastModified]) VALUES ('dataupadmin5' ,'dataupadmin5' ,1 ,null)
+
+INSERT INTO [dbo].[RepositoryDetails] ([RepositoryName] ,[RepositoryTypeId] ,[GetIdentifierUrl] ,[PostFileUrl] ,[UserId] ,[Password], [UserAgreement] ,[IsActive] ,[LastModified])
+     VALUES ('merritt-OneShare' ,1 ,'https://merritt-stage.cdlib.org/object/mint' ,'https://merritt-stage.cdlib.org/object/ingest' ,'dcxl' ,'ZABjAHgAbAA=', 'USer agreement for Merritt- ONEShare repository goes here', 1, null)
+INSERT INTO [dbo].[RepositoryDetails] ([RepositoryName] ,[RepositoryTypeId] ,[GetIdentifierUrl] ,[PostFileUrl] ,[UserId] ,[Password] , [UserAgreement] ,[IsActive] ,[LastModified])
+     VALUES ('merritt-DataONE' ,2 ,'https://merritt-stage.cdlib.org/object/mint' ,'https://merritt-stage.cdlib.org/object/ingest' ,null  ,null, 'USer agreement for Merritt- DataONE repository goes here',1, null)

WebService/AdminServiceDatabase/dbo/Tables/AdminUser.sql

+CREATE TABLE [dbo].[AdminUser] (
+    [Id]           INT           IDENTITY (1, 1) NOT NULL,
+    [UserName]     VARCHAR (200) NOT NULL,
+    [Password]     VARCHAR (200) NOT NULL,
+    [IsActive]     BIT           NULL,
+    [LastModified] DATETIME      NULL,
+    PRIMARY KEY CLUSTERED ([Id] ASC)
+);
+

WebService/AdminServiceDatabase/dbo/Tables/RepositoryDetails.sql

+CREATE TABLE [dbo].[RepositoryDetails] (
+    [Id]               INT            IDENTITY (1, 1) NOT NULL,
+    [RepositoryName]   VARCHAR (250)  NOT NULL,
+    [RepositoryTypeId] SMALLINT       NOT NULL,
+    [GetIdentifierUrl] NVARCHAR (250) NOT NULL,
+    [PostFileUrl]      NVARCHAR (250) NOT NULL,
+    [UserId]           NVARCHAR (250) NULL,
+    [Password]         NVARCHAR (250) NULL,
+    [UserAgreement]    NVARCHAR (MAX) NULL,
+    [IsActive]         BIT            CONSTRAINT [DF_RepositoryDetails_IsActive] DEFAULT ((0)) NULL,
+    [LastModified]     DATETIME       NULL,
+    [CreatedBy] [int] NOT NULL,
+    PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_RepositoryDetails_RepositoryType] FOREIGN KEY ([RepositoryTypeId]) REFERENCES [dbo].[RepositoryType] ([RepositoryTypeId]) ON DELETE NO ACTION ON UPDATE NO ACTION,
+    CONSTRAINT [FK_RepositoryDetails_RepositoryDetails] FOREIGN KEY([CreatedBy]) REFERENCES [dbo].[AdminUser] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
+);
+

WebService/AdminServiceDatabase/dbo/Tables/RepositoryType.sql

+CREATE TABLE [dbo].[RepositoryType] (
+    [RepositoryTypeId] SMALLINT      NOT NULL,
+    [RepositoryType]   VARCHAR (100) NULL,
+    [PasswordRequired] BIT           NULL,
+    PRIMARY KEY CLUSTERED ([RepositoryTypeId] ASC)
+);
+

WebService/Web.Admin.DataLayer/AdminEntities.Designer.cs

+//------------------------------------------------------------------------------
+// <auto-generated>
+//    This code was generated from a template.
+//
+//    Manual changes to this file may cause unexpected behavior in your application.
+//    Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Data.Objects;
+using System.Data.Objects.DataClasses;
+using System.Data.EntityClient;
+using System.ComponentModel;
+using System.Xml.Serialization;
+using System.Runtime.Serialization;
+
+[assembly: EdmSchemaAttribute()]
+#region EDM Relationship Metadata
+
+[assembly: EdmRelationshipAttribute("DCXLAdminModel", "FK_RepositoryDetails_RepositoryType", "RepositoryType", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DataUp.Web.Admin.DataLayer.RepositoryType), "RepositoryDetail", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DataUp.Web.Admin.DataLayer.RepositoryDetail), true)]
+[assembly: EdmRelationshipAttribute("DCXLAdminModel", "FK_RepositoryDetails_RepositoryDetails", "AdminUser", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DataUp.Web.Admin.DataLayer.AdminUser), "RepositoryDetail", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DataUp.Web.Admin.DataLayer.RepositoryDetail), true)]
+
+#endregion
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    #region Contexts
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    public partial class DCXLAdminEntities : ObjectContext
+    {
+        #region Constructors
+    
+        /// <summary>
+        /// Initializes a new DCXLAdminEntities object using the connection string found in the 'DCXLAdminEntities' section of the application configuration file.
+        /// </summary>
+        public DCXLAdminEntities() : base("name=DCXLAdminEntities", "DCXLAdminEntities")
+        {
+            this.ContextOptions.LazyLoadingEnabled = true;
+            OnContextCreated();
+        }
+    
+        /// <summary>
+        /// Initialize a new DCXLAdminEntities object.
+        /// </summary>
+        public DCXLAdminEntities(string connectionString) : base(connectionString, "DCXLAdminEntities")
+        {
+            this.ContextOptions.LazyLoadingEnabled = true;
+            OnContextCreated();
+        }
+    
+        /// <summary>
+        /// Initialize a new DCXLAdminEntities object.
+        /// </summary>
+        public DCXLAdminEntities(EntityConnection connection) : base(connection, "DCXLAdminEntities")
+        {
+            this.ContextOptions.LazyLoadingEnabled = true;
+            OnContextCreated();
+        }
+    
+        #endregion
+    
+        #region Partial Methods
+    
+        partial void OnContextCreated();
+    
+        #endregion
+    
+        #region ObjectSet Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        public ObjectSet<AdminUser> AdminUsers
+        {
+            get
+            {
+                if ((_AdminUsers == null))
+                {
+                    _AdminUsers = base.CreateObjectSet<AdminUser>("AdminUsers");
+                }
+                return _AdminUsers;
+            }
+        }
+        private ObjectSet<AdminUser> _AdminUsers;
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        public ObjectSet<RepositoryDetail> RepositoryDetails
+        {
+            get
+            {
+                if ((_RepositoryDetails == null))
+                {
+                    _RepositoryDetails = base.CreateObjectSet<RepositoryDetail>("RepositoryDetails");
+                }
+                return _RepositoryDetails;
+            }
+        }
+        private ObjectSet<RepositoryDetail> _RepositoryDetails;
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        public ObjectSet<RepositoryType> RepositoryTypes
+        {
+            get
+            {
+                if ((_RepositoryTypes == null))
+                {
+                    _RepositoryTypes = base.CreateObjectSet<RepositoryType>("RepositoryTypes");
+                }
+                return _RepositoryTypes;
+            }
+        }
+        private ObjectSet<RepositoryType> _RepositoryTypes;
+
+        #endregion
+        #region AddTo Methods
+    
+        /// <summary>
+        /// Deprecated Method for adding a new object to the AdminUsers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
+        /// </summary>
+        public void AddToAdminUsers(AdminUser adminUser)
+        {
+            base.AddObject("AdminUsers", adminUser);
+        }
+    
+        /// <summary>
+        /// Deprecated Method for adding a new object to the RepositoryDetails EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
+        /// </summary>
+        public void AddToRepositoryDetails(RepositoryDetail repositoryDetail)
+        {
+            base.AddObject("RepositoryDetails", repositoryDetail);
+        }
+    
+        /// <summary>
+        /// Deprecated Method for adding a new object to the RepositoryTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
+        /// </summary>
+        public void AddToRepositoryTypes(RepositoryType repositoryType)
+        {
+            base.AddObject("RepositoryTypes", repositoryType);
+        }
+
+        #endregion
+    }
+    
+
+    #endregion
+    
+    #region Entities
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="DCXLAdminModel", Name="AdminUser")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class AdminUser : EntityObject
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new AdminUser object.
+        /// </summary>
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="userName">Initial value of the UserName property.</param>
+        /// <param name="password">Initial value of the Password property.</param>
+        public static AdminUser CreateAdminUser(global::System.Int32 id, global::System.String userName, global::System.String password)
+        {
+            AdminUser adminUser = new AdminUser();
+            adminUser.Id = id;
+            adminUser.UserName = userName;
+            adminUser.Password = password;
+            return adminUser;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
+        {
+            get
+            {
+                return _Id;
+            }
+            set
+            {
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
+            }
+        }
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
+        partial void OnIdChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String UserName
+        {
+            get
+            {
+                return _UserName;
+            }
+            set
+            {
+                OnUserNameChanging(value);
+                ReportPropertyChanging("UserName");
+                _UserName = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("UserName");
+                OnUserNameChanged();
+            }
+        }
+        private global::System.String _UserName;
+        partial void OnUserNameChanging(global::System.String value);
+        partial void OnUserNameChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Password
+        {
+            get
+            {
+                return _Password;
+            }
+            set
+            {
+                OnPasswordChanging(value);
+                ReportPropertyChanging("Password");
+                _Password = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Password");
+                OnPasswordChanged();
+            }
+        }
+        private global::System.String _Password;
+        partial void OnPasswordChanging(global::System.String value);
+        partial void OnPasswordChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Boolean> IsActive
+        {
+            get
+            {
+                return _IsActive;
+            }
+            set
+            {
+                OnIsActiveChanging(value);
+                ReportPropertyChanging("IsActive");
+                _IsActive = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("IsActive");
+                OnIsActiveChanged();
+            }
+        }
+        private Nullable<global::System.Boolean> _IsActive;
+        partial void OnIsActiveChanging(Nullable<global::System.Boolean> value);
+        partial void OnIsActiveChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.DateTime> LastModified
+        {
+            get
+            {
+                return _LastModified;
+            }
+            set
+            {
+                OnLastModifiedChanging(value);
+                ReportPropertyChanging("LastModified");
+                _LastModified = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("LastModified");
+                OnLastModifiedChanged();
+            }
+        }
+        private Nullable<global::System.DateTime> _LastModified;
+        partial void OnLastModifiedChanging(Nullable<global::System.DateTime> value);
+        partial void OnLastModifiedChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("DCXLAdminModel", "FK_RepositoryDetails_RepositoryDetails", "RepositoryDetail")]
+        public EntityCollection<RepositoryDetail> RepositoryDetails
+        {
+            get
+            {
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<RepositoryDetail>("DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails", "RepositoryDetail");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<RepositoryDetail>("DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails", "RepositoryDetail", value);
+                }
+            }
+        }
+
+        #endregion
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="DCXLAdminModel", Name="RepositoryDetail")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class RepositoryDetail : EntityObject
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new RepositoryDetail object.
+        /// </summary>
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="repositoryName">Initial value of the RepositoryName property.</param>
+        /// <param name="repositoryTypeId">Initial value of the RepositoryTypeId property.</param>
+        /// <param name="getIdentifierUrl">Initial value of the GetIdentifierUrl property.</param>
+        /// <param name="postFileUrl">Initial value of the PostFileUrl property.</param>
+        /// <param name="createdBy">Initial value of the CreatedBy property.</param>
+        public static RepositoryDetail CreateRepositoryDetail(global::System.Int32 id, global::System.String repositoryName, global::System.Int16 repositoryTypeId, global::System.String getIdentifierUrl, global::System.String postFileUrl, global::System.Int32 createdBy)
+        {
+            RepositoryDetail repositoryDetail = new RepositoryDetail();
+            repositoryDetail.Id = id;
+            repositoryDetail.RepositoryName = repositoryName;
+            repositoryDetail.RepositoryTypeId = repositoryTypeId;
+            repositoryDetail.GetIdentifierUrl = getIdentifierUrl;
+            repositoryDetail.PostFileUrl = postFileUrl;
+            repositoryDetail.CreatedBy = createdBy;
+            return repositoryDetail;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
+        {
+            get
+            {
+                return _Id;
+            }
+            set
+            {
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
+            }
+        }
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
+        partial void OnIdChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String RepositoryName
+        {
+            get
+            {
+                return _RepositoryName;
+            }
+            set
+            {
+                OnRepositoryNameChanging(value);
+                ReportPropertyChanging("RepositoryName");
+                _RepositoryName = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("RepositoryName");
+                OnRepositoryNameChanged();
+            }
+        }
+        private global::System.String _RepositoryName;
+        partial void OnRepositoryNameChanging(global::System.String value);
+        partial void OnRepositoryNameChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int16 RepositoryTypeId
+        {
+            get
+            {
+                return _RepositoryTypeId;
+            }
+            set
+            {
+                OnRepositoryTypeIdChanging(value);
+                ReportPropertyChanging("RepositoryTypeId");
+                _RepositoryTypeId = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("RepositoryTypeId");
+                OnRepositoryTypeIdChanged();
+            }
+        }
+        private global::System.Int16 _RepositoryTypeId;
+        partial void OnRepositoryTypeIdChanging(global::System.Int16 value);
+        partial void OnRepositoryTypeIdChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String GetIdentifierUrl
+        {
+            get
+            {
+                return _GetIdentifierUrl;
+            }
+            set
+            {
+                OnGetIdentifierUrlChanging(value);
+                ReportPropertyChanging("GetIdentifierUrl");
+                _GetIdentifierUrl = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("GetIdentifierUrl");
+                OnGetIdentifierUrlChanged();
+            }
+        }
+        private global::System.String _GetIdentifierUrl;
+        partial void OnGetIdentifierUrlChanging(global::System.String value);
+        partial void OnGetIdentifierUrlChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String PostFileUrl
+        {
+            get
+            {
+                return _PostFileUrl;
+            }
+            set
+            {
+                OnPostFileUrlChanging(value);
+                ReportPropertyChanging("PostFileUrl");
+                _PostFileUrl = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("PostFileUrl");
+                OnPostFileUrlChanged();
+            }
+        }
+        private global::System.String _PostFileUrl;
+        partial void OnPostFileUrlChanging(global::System.String value);
+        partial void OnPostFileUrlChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String UserId
+        {
+            get
+            {
+                return _UserId;
+            }
+            set
+            {
+                OnUserIdChanging(value);
+                ReportPropertyChanging("UserId");
+                _UserId = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("UserId");
+                OnUserIdChanged();
+            }
+        }
+        private global::System.String _UserId;
+        partial void OnUserIdChanging(global::System.String value);
+        partial void OnUserIdChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String Password
+        {
+            get
+            {
+                return _Password;
+            }
+            set
+            {
+                OnPasswordChanging(value);
+                ReportPropertyChanging("Password");
+                _Password = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("Password");
+                OnPasswordChanged();
+            }
+        }
+        private global::System.String _Password;
+        partial void OnPasswordChanging(global::System.String value);
+        partial void OnPasswordChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Boolean> IsActive
+        {
+            get
+            {
+                return _IsActive;
+            }
+            set
+            {
+                OnIsActiveChanging(value);
+                ReportPropertyChanging("IsActive");
+                _IsActive = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("IsActive");
+                OnIsActiveChanged();
+            }
+        }
+        private Nullable<global::System.Boolean> _IsActive;
+        partial void OnIsActiveChanging(Nullable<global::System.Boolean> value);
+        partial void OnIsActiveChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.DateTime> LastModified
+        {
+            get
+            {
+                return _LastModified;
+            }
+            set
+            {
+                OnLastModifiedChanging(value);
+                ReportPropertyChanging("LastModified");
+                _LastModified = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("LastModified");
+                OnLastModifiedChanged();
+            }
+        }
+        private Nullable<global::System.DateTime> _LastModified;
+        partial void OnLastModifiedChanging(Nullable<global::System.DateTime> value);
+        partial void OnLastModifiedChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String UserAgreement
+        {
+            get
+            {
+                return _UserAgreement;
+            }
+            set
+            {
+                OnUserAgreementChanging(value);
+                ReportPropertyChanging("UserAgreement");
+                _UserAgreement = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("UserAgreement");
+                OnUserAgreementChanged();
+            }
+        }
+        private global::System.String _UserAgreement;
+        partial void OnUserAgreementChanging(global::System.String value);
+        partial void OnUserAgreementChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 CreatedBy
+        {
+            get
+            {
+                return _CreatedBy;
+            }
+            set
+            {
+                OnCreatedByChanging(value);
+                ReportPropertyChanging("CreatedBy");
+                _CreatedBy = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("CreatedBy");
+                OnCreatedByChanged();
+            }
+        }
+        private global::System.Int32 _CreatedBy;
+        partial void OnCreatedByChanging(global::System.Int32 value);
+        partial void OnCreatedByChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("DCXLAdminModel", "FK_RepositoryDetails_RepositoryType", "RepositoryType")]
+        public RepositoryType RepositoryType
+        {
+            get
+            {
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<RepositoryType>("DCXLAdminModel.FK_RepositoryDetails_RepositoryType", "RepositoryType").Value;
+            }
+            set
+            {
+                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<RepositoryType>("DCXLAdminModel.FK_RepositoryDetails_RepositoryType", "RepositoryType").Value = value;
+            }
+        }
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [BrowsableAttribute(false)]
+        [DataMemberAttribute()]
+        public EntityReference<RepositoryType> RepositoryTypeReference
+        {
+            get
+            {
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<RepositoryType>("DCXLAdminModel.FK_RepositoryDetails_RepositoryType", "RepositoryType");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<RepositoryType>("DCXLAdminModel.FK_RepositoryDetails_RepositoryType", "RepositoryType", value);
+                }
+            }
+        }
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("DCXLAdminModel", "FK_RepositoryDetails_RepositoryDetails", "AdminUser")]
+        public AdminUser AdminUser
+        {
+            get
+            {
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<AdminUser>("DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails", "AdminUser").Value;
+            }
+            set
+            {
+                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<AdminUser>("DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails", "AdminUser").Value = value;
+            }
+        }
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [BrowsableAttribute(false)]
+        [DataMemberAttribute()]
+        public EntityReference<AdminUser> AdminUserReference
+        {
+            get
+            {
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<AdminUser>("DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails", "AdminUser");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<AdminUser>("DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails", "AdminUser", value);
+                }
+            }
+        }
+
+        #endregion
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="DCXLAdminModel", Name="RepositoryType")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class RepositoryType : EntityObject
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new RepositoryType object.
+        /// </summary>
+        /// <param name="repositoryTypeId">Initial value of the RepositoryTypeId property.</param>
+        public static RepositoryType CreateRepositoryType(global::System.Int16 repositoryTypeId)
+        {
+            RepositoryType repositoryType = new RepositoryType();
+            repositoryType.RepositoryTypeId = repositoryTypeId;
+            return repositoryType;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int16 RepositoryTypeId
+        {
+            get
+            {
+                return _RepositoryTypeId;
+            }
+            set
+            {
+                if (_RepositoryTypeId != value)
+                {
+                    OnRepositoryTypeIdChanging(value);
+                    ReportPropertyChanging("RepositoryTypeId");
+                    _RepositoryTypeId = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("RepositoryTypeId");
+                    OnRepositoryTypeIdChanged();
+                }
+            }
+        }
+        private global::System.Int16 _RepositoryTypeId;
+        partial void OnRepositoryTypeIdChanging(global::System.Int16 value);
+        partial void OnRepositoryTypeIdChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String RepositoryType1
+        {
+            get
+            {
+                return _RepositoryType1;
+            }
+            set
+            {
+                OnRepositoryType1Changing(value);
+                ReportPropertyChanging("RepositoryType1");
+                _RepositoryType1 = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("RepositoryType1");
+                OnRepositoryType1Changed();
+            }
+        }
+        private global::System.String _RepositoryType1;
+        partial void OnRepositoryType1Changing(global::System.String value);
+        partial void OnRepositoryType1Changed();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Boolean> PasswordRequired
+        {
+            get
+            {
+                return _PasswordRequired;
+            }
+            set
+            {
+                OnPasswordRequiredChanging(value);
+                ReportPropertyChanging("PasswordRequired");
+                _PasswordRequired = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("PasswordRequired");
+                OnPasswordRequiredChanged();
+            }
+        }
+        private Nullable<global::System.Boolean> _PasswordRequired;
+        partial void OnPasswordRequiredChanging(Nullable<global::System.Boolean> value);
+        partial void OnPasswordRequiredChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("DCXLAdminModel", "FK_RepositoryDetails_RepositoryType", "RepositoryDetail")]
+        public EntityCollection<RepositoryDetail> RepositoryDetails
+        {
+            get
+            {
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<RepositoryDetail>("DCXLAdminModel.FK_RepositoryDetails_RepositoryType", "RepositoryDetail");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<RepositoryDetail>("DCXLAdminModel.FK_RepositoryDetails_RepositoryType", "RepositoryDetail", value);
+                }
+            }
+        }
+
+        #endregion
+    }
+
+    #endregion
+    
+}

WebService/Web.Admin.DataLayer/AdminEntities.edmx

+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
+  <!-- EF Runtime content -->
+  <edmx:Runtime>
+    <!-- SSDL content -->
+    <edmx:StorageModels>
+    <Schema Namespace="DCXLAdminModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
+        <EntityContainer Name="DCXLAdminModelStoreContainer">
+          <EntitySet Name="AdminUser" EntityType="DCXLAdminModel.Store.AdminUser" store:Type="Tables" Schema="dbo" />
+          <EntitySet Name="RepositoryDetails" EntityType="DCXLAdminModel.Store.RepositoryDetails" store:Type="Tables" Schema="dbo" />
+          <EntitySet Name="RepositoryType" EntityType="DCXLAdminModel.Store.RepositoryType" store:Type="Tables" Schema="dbo" />
+          <AssociationSet Name="FK_RepositoryDetails_RepositoryDetails" Association="DCXLAdminModel.Store.FK_RepositoryDetails_RepositoryDetails">
+            <End Role="AdminUser" EntitySet="AdminUser" />
+            <End Role="RepositoryDetails" EntitySet="RepositoryDetails" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RepositoryDetails_RepositoryType" Association="DCXLAdminModel.Store.FK_RepositoryDetails_RepositoryType">
+            <End Role="RepositoryType" EntitySet="RepositoryType" />
+            <End Role="RepositoryDetails" EntitySet="RepositoryDetails" />
+          </AssociationSet>
+        </EntityContainer>
+        <EntityType Name="AdminUser">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
+          <Property Name="UserName" Type="varchar" Nullable="false" MaxLength="200" />
+          <Property Name="Password" Type="varchar" Nullable="false" MaxLength="200" />
+          <Property Name="IsActive" Type="bit" />
+          <Property Name="LastModified" Type="datetime" />
+        </EntityType>
+        <EntityType Name="RepositoryDetails">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
+          <Property Name="RepositoryName" Type="varchar" Nullable="false" MaxLength="250" />
+          <Property Name="RepositoryTypeId" Type="smallint" Nullable="false" />
+          <Property Name="GetIdentifierUrl" Type="nvarchar" Nullable="false" MaxLength="250" />
+          <Property Name="PostFileUrl" Type="nvarchar" Nullable="false" MaxLength="250" />
+          <Property Name="UserId" Type="nvarchar" MaxLength="250" />
+          <Property Name="Password" Type="nvarchar" MaxLength="250" />
+          <Property Name="IsActive" Type="bit" />
+          <Property Name="LastModified" Type="datetime" />
+          <Property Name="UserAgreement" Type="nvarchar(max)" />
+          <Property Name="CreatedBy" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="RepositoryType">
+          <Key>
+            <PropertyRef Name="RepositoryTypeId" />
+          </Key>
+          <Property Name="RepositoryTypeId" Type="smallint" Nullable="false" />
+          <Property Name="RepositoryType" Type="varchar" MaxLength="100" />
+          <Property Name="PasswordRequired" Type="bit" />
+        </EntityType>
+        <Association Name="FK_RepositoryDetails_RepositoryDetails">
+          <End Role="AdminUser" Type="DCXLAdminModel.Store.AdminUser" Multiplicity="1" />
+          <End Role="RepositoryDetails" Type="DCXLAdminModel.Store.RepositoryDetails" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="AdminUser">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="RepositoryDetails">
+              <PropertyRef Name="CreatedBy" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_RepositoryDetails_RepositoryType">
+          <End Role="RepositoryType" Type="DCXLAdminModel.Store.RepositoryType" Multiplicity="1" />
+          <End Role="RepositoryDetails" Type="DCXLAdminModel.Store.RepositoryDetails" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="RepositoryType">
+              <PropertyRef Name="RepositoryTypeId" />
+            </Principal>
+            <Dependent Role="RepositoryDetails">
+              <PropertyRef Name="RepositoryTypeId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+      </Schema></edmx:StorageModels>
+    <!-- CSDL content -->
+    <edmx:ConceptualModels>
+      <Schema Namespace="DCXLAdminModel" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
+        <EntityContainer Name="DCXLAdminEntities" annotation:LazyLoadingEnabled="true">
+          <EntitySet Name="AdminUsers" EntityType="DCXLAdminModel.AdminUser" />
+          <EntitySet Name="RepositoryDetails" EntityType="DCXLAdminModel.RepositoryDetail" />
+          <EntitySet Name="RepositoryTypes" EntityType="DCXLAdminModel.RepositoryType" />
+          <AssociationSet Name="FK_RepositoryDetails_RepositoryType" Association="DCXLAdminModel.FK_RepositoryDetails_RepositoryType">
+            <End Role="RepositoryType" EntitySet="RepositoryTypes" />
+            <End Role="RepositoryDetail" EntitySet="RepositoryDetails" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RepositoryDetails_RepositoryDetails" Association="DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails">
+            <End Role="AdminUser" EntitySet="AdminUsers" />
+            <End Role="RepositoryDetail" EntitySet="RepositoryDetails" />
+          </AssociationSet>
+        </EntityContainer>
+        <EntityType Name="AdminUser">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Type="Int32" Name="Id" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Type="String" Name="UserName" Nullable="false" MaxLength="200" FixedLength="false" Unicode="false" />
+          <Property Type="String" Name="Password" Nullable="false" MaxLength="200" FixedLength="false" Unicode="false" />
+          <Property Type="Boolean" Name="IsActive" />
+          <Property Type="DateTime" Name="LastModified" />
+          <NavigationProperty Name="RepositoryDetails" Relationship="DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails" FromRole="AdminUser" ToRole="RepositoryDetail" />
+        </EntityType>
+        <EntityType Name="RepositoryDetail">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Type="Int32" Name="Id" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Type="String" Name="RepositoryName" Nullable="false" MaxLength="250" FixedLength="false" Unicode="false" />
+          <Property Type="Int16" Name="RepositoryTypeId" Nullable="false" />
+          <Property Type="String" Name="GetIdentifierUrl" Nullable="false" MaxLength="250" FixedLength="false" Unicode="true" />
+          <Property Type="String" Name="PostFileUrl" Nullable="false" MaxLength="250" FixedLength="false" Unicode="true" />
+          <Property Type="String" Name="UserId" MaxLength="250" FixedLength="false" Unicode="true" />
+          <Property Type="String" Name="Password" MaxLength="250" FixedLength="false" Unicode="true" />
+          <Property Type="Boolean" Name="IsActive" />
+          <Property Type="DateTime" Name="LastModified" />
+          <NavigationProperty Name="RepositoryType" Relationship="DCXLAdminModel.FK_RepositoryDetails_RepositoryType" FromRole="RepositoryDetail" ToRole="RepositoryType" />
+          <Property Type="String" Name="UserAgreement" MaxLength="Max" FixedLength="false" Unicode="true" />
+          <Property Type="Int32" Name="CreatedBy" Nullable="false" />
+          <NavigationProperty Name="AdminUser" Relationship="DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails" FromRole="RepositoryDetail" ToRole="AdminUser" />
+        </EntityType>
+        <EntityType Name="RepositoryType">
+          <Key>
+            <PropertyRef Name="RepositoryTypeId" />
+          </Key>
+          <Property Type="Int16" Name="RepositoryTypeId" Nullable="false" />
+          <Property Type="String" Name="RepositoryType1" MaxLength="100" FixedLength="false" Unicode="false" />
+          <Property Type="Boolean" Name="PasswordRequired" />
+          <NavigationProperty Name="RepositoryDetails" Relationship="DCXLAdminModel.FK_RepositoryDetails_RepositoryType" FromRole="RepositoryType" ToRole="RepositoryDetail" />
+        </EntityType>
+        <Association Name="FK_RepositoryDetails_RepositoryType">
+          <End Type="DCXLAdminModel.RepositoryType" Role="RepositoryType" Multiplicity="1" />
+          <End Type="DCXLAdminModel.RepositoryDetail" Role="RepositoryDetail" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="RepositoryType">
+              <PropertyRef Name="RepositoryTypeId" />
+            </Principal>
+            <Dependent Role="RepositoryDetail">
+              <PropertyRef Name="RepositoryTypeId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_RepositoryDetails_RepositoryDetails">
+          <End Type="DCXLAdminModel.AdminUser" Role="AdminUser" Multiplicity="1" />
+          <End Type="DCXLAdminModel.RepositoryDetail" Role="RepositoryDetail" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="AdminUser">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="RepositoryDetail">
+              <PropertyRef Name="CreatedBy" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+      </Schema>
+    </edmx:ConceptualModels>
+    <!-- C-S mapping content -->
+    <edmx:Mappings>
+      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">
+        <EntityContainerMapping StorageEntityContainer="DCXLAdminModelStoreContainer" CdmEntityContainer="DCXLAdminEntities">
+          <EntitySetMapping Name="AdminUsers">
+            <EntityTypeMapping TypeName="DCXLAdminModel.AdminUser">
+              <MappingFragment StoreEntitySet="AdminUser">
+                <ScalarProperty Name="LastModified" ColumnName="LastModified" />
+                <ScalarProperty Name="IsActive" ColumnName="IsActive" />
+                <ScalarProperty Name="Password" ColumnName="Password" />
+                <ScalarProperty Name="UserName" ColumnName="UserName" />
+                <ScalarProperty Name="Id" ColumnName="Id" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="RepositoryDetails">
+            <EntityTypeMapping TypeName="DCXLAdminModel.RepositoryDetail">
+              <MappingFragment StoreEntitySet="RepositoryDetails">
+                <ScalarProperty Name="CreatedBy" ColumnName="CreatedBy" />
+                <ScalarProperty Name="UserAgreement" ColumnName="UserAgreement" />
+                <ScalarProperty Name="LastModified" ColumnName="LastModified" />
+                <ScalarProperty Name="IsActive" ColumnName="IsActive" />
+                <ScalarProperty Name="Password" ColumnName="Password" />
+                <ScalarProperty Name="UserId" ColumnName="UserId" />
+                <ScalarProperty Name="PostFileUrl" ColumnName="PostFileUrl" />
+                <ScalarProperty Name="GetIdentifierUrl" ColumnName="GetIdentifierUrl" />
+                <ScalarProperty Name="RepositoryTypeId" ColumnName="RepositoryTypeId" />
+                <ScalarProperty Name="RepositoryName" ColumnName="RepositoryName" />
+                <ScalarProperty Name="Id" ColumnName="Id" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="RepositoryTypes">
+            <EntityTypeMapping TypeName="DCXLAdminModel.RepositoryType">
+              <MappingFragment StoreEntitySet="RepositoryType">
+                <ScalarProperty Name="PasswordRequired" ColumnName="PasswordRequired" />
+                <ScalarProperty Name="RepositoryType1" ColumnName="RepositoryType" />
+                <ScalarProperty Name="RepositoryTypeId" ColumnName="RepositoryTypeId" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+        </EntityContainerMapping>
+      </Mapping>
+    </edmx:Mappings>
+  </edmx:Runtime>
+  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
+    <Connection>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
+      </DesignerInfoPropertySet>
+    </Connection>
+    <Options>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="ValidateOnBuild" Value="true" />
+        <DesignerProperty Name="EnablePluralization" Value="True" />
+        <DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
+      </DesignerInfoPropertySet>
+    </Options>
+    <!-- Diagram content (shape and connector positions) -->
+    <Diagrams>
+      <Diagram Name="Model1" ZoomLevel="100">
+        <EntityTypeShape EntityType="DCXLAdminModel.AdminUser" Width="1.5" PointX="0.75" PointY="4.75" Height="1.9802864583333317" />
+        <EntityTypeShape EntityType="DCXLAdminModel.RepositoryDetail" Width="1.5" PointX="3" PointY="1" Height="2.9417936197916656" />
+        <EntityTypeShape EntityType="DCXLAdminModel.RepositoryType" Width="1.5" PointX="0.75" PointY="1.5" Height="1.7879850260416674" />
+        <AssociationConnector Association="DCXLAdminModel.FK_RepositoryDetails_RepositoryType" >
+          <ConnectorPoint PointX="2.25" PointY="2.3939925130208337" />
+          <ConnectorPoint PointX="3" PointY="2.3939925130208337" />
+        </AssociationConnector>
+        <AssociationConnector Association="DCXLAdminModel.FK_RepositoryDetails_RepositoryDetails" >
+          <ConnectorPoint PointX="2.25" PointY="5.8362939453125" />
+          <ConnectorPoint PointX="3.75" PointY="5.8362939453125" />
+          <ConnectorPoint PointX="3.75" PointY="4.5186979166666656" />
+        </AssociationConnector>
+      </Diagram>
+    </Diagrams>
+  </Designer>
+</edmx:Edmx>

WebService/Web.Admin.DataLayer/AdminUserRepository.cs

+using System.Linq;
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    public class AdminUserRepository: RepositoryBase<AdminUser>, IAdminUserRepository
+    {
+        private readonly DCXLAdminEntities dcxlAdminEntities;
+
+        public AdminUserRepository(DCXLAdminEntities dcxlEntities)
+            : base(dcxlEntities)
+        {
+            this.dcxlAdminEntities = dcxlEntities;
+        }
+
+        public AdminUser GetAdminUser(int userId)
+        {
+            var users = this.dcxlAdminEntities.AdminUsers.FirstOrDefault<AdminUser>(u => u.Id == userId);
+            return users;
+        }
+
+        public AdminUser GetAdminUser(string userName, string password)
+        {
+            var user = this.dcxlAdminEntities.AdminUsers.FirstOrDefault(q =>
+                q.UserName == userName && q.Password == password && q.IsActive == (q.IsActive.HasValue ? (bool)q.IsActive : false)
+            );
+            return user;
+        }
+
+        public bool IsAuthenticatedUser(string userName, string password)
+        {
+            return this.dcxlAdminEntities.AdminUsers.Any(q =>            
+                q.UserName == userName && q.Password == password && q.IsActive == (q.IsActive.HasValue ? (bool)q.IsActive : false)
+            );
+        }
+    }
+}

WebService/Web.Admin.DataLayer/App.Config

+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  </configSections>
+  <connectionStrings><add name="DCXLAdminEntities" connectionString="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=localhost;initial catalog=DCXLAdmin;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
+  <entityFramework>
+    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
+      <parameters>
+        <parameter value="Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True" />
+      </parameters>
+    </defaultConnectionFactory>
+  </entityFramework>
+</configuration>

WebService/Web.Admin.DataLayer/CompiledQueries/AdminUserQueries.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data.Linq;
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    public class AdminUserQueries
+    {
+        /*private static readonly Func<AdventureWorksEntities, Decimal, IQueryable<SalesOrderHeader>> s_compiledQuery2 = 
+    CompiledQuery.Compile<AdventureWorksEntities, Decimal, IQueryable<SalesOrderHeader>>(
+            (ctx, total) => from order in ctx.SalesOrderHeaders
+                            where order.TotalDue >= total
+                            select order);*/
+
+       /* private static readonly Func<DCXLAdminEntities, string, string, bool> _isAuthenticatedUser =
+
+            CompiledQuery.Compile<DCXLAdminEntities, string, string, bool>((ctx, userName, passWord) =>
+                ctx.AdminUsers.Any(q => q.UserName == userName && 
+                                        q.Password == passWord && 
+                                        q.IsActive == (q.IsActive.HasValue ? (bool)q.IsActive : false))
+            
+            );  */
+
+        
+    }
+}

WebService/Web.Admin.DataLayer/Interfaces/IAdminUserRepository.cs

+using System;
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    public interface IAdminUserRepository: IRepositoryBase<AdminUser>
+    {
+        AdminUser GetAdminUser(int userId);
+        AdminUser GetAdminUser(string userName, string password);
+        bool IsAuthenticatedUser(string userName, string password);
+    }
+}

WebService/Web.Admin.DataLayer/Interfaces/IRepositoryBase.cs

+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    public interface IRepositoryBase<T> where T : class
+    {
+
+    }
+}

WebService/Web.Admin.DataLayer/Interfaces/IRepositoryDetailsDB.cs

+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    public interface IRepositoryDetailsDB : IRepositoryBase<RepositoryDetail>
+    {
+        IEnumerable<RepositoryDetail> GetRespositories();
+        IEnumerable<RepositoryType> GetRespositoryTypes();
+        RepositoryDetail GetRepositoryDetails(int repositoryId);
+        bool AddRepository(RepositoryDetail value);
+        bool UpdateRepositoryDetails(RepositoryDetail value);
+        bool DeleteRepositoryDetails(int repositoryId);
+        bool CheckRepositoryName(string repositoryName, int repositoryId, int repositoryTypeId);
+    }
+}
+

WebService/Web.Admin.DataLayer/Model/RepositoryInfo.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    public class RepositoryInfo
+    {
+        public RepositoryInfo() { }
+
+        public RepositoryInfo(int repositoryId, 
+                                string repositoryName, 
+                                string identifierLink, 
+                                string postFileLink,
+                                RepositoryType repositoryType,
+                                string userName,
+                                string passWord)
+        {
+            this.RepositoryId = repositoryId;
+            this.Name = repositoryName;
+            this.IdentifierLink = identifierLink;
+            this.PostFileLink = postFileLink;
+            this.RepositoryType = repositoryType;
+            this.UserName = userName;
+            this.Password = passWord;
+        }
+
+        public int RepositoryId { get; set; }
+
+        public string Name { get; set; }
+
+        public string IdentifierLink { get; set; }
+
+        public string PostFileLink { get; set; }
+
+        public RepositoryType RepositoryType { get; set; }
+
+        public string UserName { get; set; }
+
+        public string Password { get; set; }
+    }
+}

WebService/Web.Admin.DataLayer/Properties/AssemblyInfo.cs

+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Web.Admin.DataLayer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Web.Admin.DataLayer")]
+[assembly: AssemblyCopyright("Copyright ©  2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("14ae2836-463d-4791-b42c-d41fab3ba702")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

WebService/Web.Admin.DataLayer/RepositoryBase.cs

+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.Entity;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Data.Objects;
+
+namespace DataUp.Web.Admin.DataLayer
+{
+    /// <summary>
+    /// Abstract base repository class having the implementation for methods which are
+    /// common to all the db entities.
+    /// </summary>
+    /// <typeparam name="T">Template object</typeparam>
+    public class RepositoryBase<T> : IRepositoryBase<T> where T : class
+    {
+        /// <summary>
+        /// Data Up database context
+        /// </summary>
+        private DCXLAdminEntities dcxlAdminDbContext;
+
+        /// <summary>
+        /// Initializes a new instance of the RepositoryBase class.
+        /// </summary>
+        /// <param name="dcxlDbContext">Database context of DCXL DB</param>
+        public RepositoryBase(DCXLAdminEntities dcxlDbContext)
+        {
+            this.dcxlAdminDbContext = dcxlDbContext;
+        }
+
+        /// <summary>
+        /// Gets or sets the DCXL database context
+        /// </summary>
+        public DCXLAdminEntities DCXLDbContext
+        {
+            get
+            {
+                return dcxlAdminDbContext;
+            }
+            set
+            {
+                dcxlAdminDbContext = value;
+            }
+        }
+
+        /// <summary>
+        /// Gets the DbSet instance from the DCXL database context
+        /// </summary>
+        protected ObjectSet<T> ObjectSet
+        {
+            get
+            {
+                return DCXLDbContext.CreateObjectSet<T>();
+            }
+        }
+
+        /// <summary>
+        /// Adds the given entity to the DCXL database.
+        /// </summary>
+        /// <param name="entity">Entity to be added</param>
+        public void Add(T entity)
+        {
+            ObjectSet.AddObject(entity);
+        }
+
+        /// <summary>
+        /// Updates the given Entity in the DCXL database.
+        /// </summary>
+        /// <param name="entity">Entity to be updated</param>