Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/HeuristicLab.Services.Deployment.DataAccess.csproj
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/HeuristicLab.Services.Deployment.DataAccess.csproj	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/HeuristicLab.Services.Deployment.DataAccess.csproj	(revision 2742)
@@ -0,0 +1,101 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{EBEBA863-DD05-4331-BE25-5758B15F7407}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Services.Deployment.DataAccess</RootNamespace>
+    <AssemblyName>HeuristicLab.Services.Deployment.DataAccess</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Runtime.Serialization">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Transactions" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ProductDescription.cs" />
+    <Compile Include="PluginDescription.cs" />
+    <Compile Include="PluginStore.cs" />
+    <Compile Include="PluginStoreClasses.cs">
+      <DependentUpon>PluginStoreClasses.dbml</DependentUpon>
+    </Compile>
+    <Compile Include="PluginStoreClasses.designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>PluginStoreClasses.dbml</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+      <DependentUpon>Settings.settings</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="PluginStoreClasses.dbml">
+      <Generator>MSLinqToSQLGenerator</Generator>
+      <LastGenOutput>PluginStoreClasses.designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="app.config" />
+    <None Include="PluginStoreClasses.dbml.layout">
+      <DependentUpon>PluginStoreClasses.dbml</DependentUpon>
+    </None>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginDescription.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginDescription.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginDescription.cs	(revision 2742)
@@ -0,0 +1,67 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.Deployment.DataAccess {
+  [DataContract(Name = "PluginDescription")]
+  public class PluginDescription {
+
+    [DataMember(Name = "Id")]
+    private long id;
+    internal long Id {
+      get {
+        return id;
+      }
+      set {
+        id = value;
+      }
+    }
+
+    [DataMember(Name = "Name")]
+    private string name;
+    public string Name {
+      get { return name; }
+    }
+
+    [DataMember(Name = "Version")]
+    private Version version;
+    public Version Version {
+      get { return version; }
+    }
+
+
+    [DataMember(Name = "Dependencies")]
+    private IEnumerable<PluginDescription> dependencies;
+    public IEnumerable<PluginDescription> Dependencies {
+      get { return dependencies; }
+    }
+
+    //[DataMember(Name = "IsDatabaseInstance")]
+    //private bool isDatabaseInstance;
+    //internal bool IsDatabaseInstance {
+    //  get {
+    //    return isDatabaseInstance;
+    //  }
+    //}
+
+    internal PluginDescription(long id, string name, Version version, IEnumerable<PluginDescription> dependencies) {
+      this.id = id;
+      this.name = name;
+      this.version = version;
+      this.dependencies = new List<PluginDescription>(dependencies).AsReadOnly();
+      //this.isDatabaseInstance = true;
+    }
+
+    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies)
+      : this(0, name, version, dependencies) {
+      //this.isDatabaseInstance = false;
+    }
+
+    public PluginDescription(string name, Version version)
+      : this(name, version, Enumerable.Empty<PluginDescription>()) {
+      //this.isDatabaseInstance = false;
+    }
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStore.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStore.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStore.cs	(revision 2742)
@@ -0,0 +1,192 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data.Common;
+using System.Transactions;
+using System.Data.SqlClient;
+
+namespace HeuristicLab.Services.Deployment.DataAccess {
+  public class PluginStore {
+
+    private PluginStoreClassesDataContext ctx;
+    public PluginStore() {
+      ctx = new PluginStoreClassesDataContext();
+    }
+
+    public IEnumerable<ProductDescription> Products {
+      get {
+        return from p in ctx.Products
+               let plugins = from pair in ctx.ProductPlugins
+                             from plugin in ctx.Plugins
+                             where pair.ProductId == p.Id
+                             where plugin.Id == pair.PluginId
+                             select plugin
+               select MakeProductDescription(p, plugins);
+      }
+    }
+
+    private ProductDescription MakeProductDescription(Product p, IQueryable<Plugin> plugins) {
+      var desc = new ProductDescription(p.Id, p.Name, new Version(p.Version), from plugin in plugins
+                                                                              select MakePluginDescription(plugin));
+      return desc;
+    }
+
+    private PluginDescription MakePluginDescription(Plugin plugin) {
+      var desc = new PluginDescription(plugin.Id, plugin.Name, new Version(plugin.Version), from dep in GetDependencies(plugin)
+                                                                                            select MakePluginDescription(dep));
+      return desc;
+    }
+
+    private IEnumerable<Plugin> GetDependencies(Plugin plugin) {
+      return from pair in ctx.Dependencies
+             from dependency in ctx.Plugins
+             where pair.PluginId == plugin.Id
+             where pair.DependencyId == dependency.Id
+             select dependency;
+    }
+
+    public IEnumerable<PluginDescription> Plugins {
+      get {
+        return from plugin in ctx.Plugins
+               select MakePluginDescription(plugin);
+      }
+    }
+
+    public byte[] PluginFile(PluginDescription pluginDescription) {
+      return (from file in ctx.PluginPackages
+              where file.PluginId == pluginDescription.Id
+              select file.Data.ToArray()).Single();
+    }
+
+    public void Persist(PluginDescription pluginDescription, byte[] pluginPackage) {
+      try {
+        using (var transaction = new TransactionScope()) {
+          InsertOrUpdatePlugin(pluginDescription);
+          InsertOrUpdatePluginPackage(pluginDescription, pluginPackage);
+          ctx.SubmitChanges();
+          transaction.Complete();
+        }
+      }
+      catch (SqlException ex) {
+        throw new ArgumentException("Something went wrong while trying to persist plugin", ex);
+      }
+    }
+
+    public void Persist(ProductDescription product) {
+      using (var transaction = new TransactionScope()) {
+        InsertOrUpdateProduct(product);
+        foreach (var plugin in product.Plugins) {
+          InsertOrUpdatePlugin(plugin);
+        }
+        ctx.SubmitChanges();
+        transaction.Complete();
+      }
+    }
+
+    private void InsertOrUpdatePluginPackage(PluginDescription pluginDescription, byte[] pluginPackage) {
+      var existing = from p in ctx.PluginPackages
+                     where p.PluginId == pluginDescription.Id
+                     select p;
+
+      if (existing.Count() == 0) {
+        ctx.PluginPackages.InsertOnSubmit(MakePluginPackage(pluginDescription, pluginPackage));
+      } else {
+        var exisingPackage = existing.Single();
+        exisingPackage.Data = pluginPackage;
+      }
+    }
+
+    private void InsertOrUpdateProduct(ProductDescription product) {
+      var existing = from p in ctx.Products
+                     where p.Id == product.Id
+                     select p;
+      if (existing.Count() == 0) {
+        var newEntity = MakeProductFromDescription(product);
+        ctx.Products.InsertOnSubmit(newEntity);
+        // submit and write back db generated key
+        ctx.SubmitChanges();
+        product.Id = newEntity.Id;
+      } else {
+        var existingProduct = existing.Single();
+        existingProduct.Name = product.Name;
+        existingProduct.Version = product.Version.ToString();
+      }
+      foreach (var plugin in product.Plugins) {
+        InsertOrUpdateProductPlugin(plugin, product);
+        InsertOrUpdatePlugin(plugin);
+      }
+    }
+
+    private void InsertOrUpdateProductPlugin(PluginDescription plugin, ProductDescription product) {
+      var existing = from pair in ctx.ProductPlugins
+                     where pair.PluginId == plugin.Id
+                     where pair.ProductId == product.Id
+                     select pair;
+      if (existing.Count() != 0) {
+        var newEntity = new ProductPlugin();
+        newEntity.PluginId = plugin.Id;
+        newEntity.ProductId = product.Id;
+        ctx.ProductPlugins.InsertOnSubmit(newEntity);
+      }
+    }
+
+    private void InsertOrUpdatePlugin(PluginDescription plugin) {
+      var existing = from p in ctx.Plugins
+                     where p.Name == plugin.Name
+                     where p.Version == plugin.Version.ToString()
+                     select p;
+      if (existing.Count() == 0) {
+        var newEntity = MakePluginFromDescription(plugin);
+        ctx.Plugins.InsertOnSubmit(newEntity);
+        // submit and write back db generated key
+        ctx.SubmitChanges();
+        plugin.Id = newEntity.Id;
+      } else {
+        var existingPlugin = existing.Single();
+        plugin.Id = existingPlugin.Id;
+      }
+      foreach (var dependency in plugin.Dependencies) {
+        InsertOrUpdateDependency(plugin, dependency);
+        InsertOrUpdatePlugin(dependency);
+      }
+    }
+
+    private void InsertOrUpdateDependency(PluginDescription plugin, PluginDescription dependency) {
+      var existing = from pair in ctx.Dependencies
+                     where pair.DependencyId == dependency.Id
+                     where pair.PluginId == plugin.Id
+                     select pair;
+      if (existing.Count() == 0) {
+        var newEntity = new Dependency();
+        newEntity.PluginId = plugin.Id;
+        newEntity.DependencyId = dependency.Id;
+        ctx.Dependencies.InsertOnSubmit(newEntity);
+      }
+    }
+
+    private Plugin MakePluginFromDescription(PluginDescription pluginDescription) {
+      var plugin = new Plugin();
+      plugin.Id = pluginDescription.Id;
+      plugin.Name = pluginDescription.Name;
+      plugin.Version = pluginDescription.Version.ToString();
+      return plugin;
+    }
+
+    private Product MakeProductFromDescription(ProductDescription desc) {
+      var product = new Product();
+      product.Id = desc.Id;
+      product.Name = desc.Name;
+      product.Version = desc.Version.ToString();
+      return product;
+    }
+
+    private PluginPackage MakePluginPackage(PluginDescription pluginDescription, byte[] pluginPackage) {
+      var package = new PluginPackage();
+      package.Data = pluginPackage;
+      package.PluginId = pluginDescription.Id;
+      package.FileName = string.Empty;
+      return package;
+    }
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml	(revision 2742)
@@ -0,0 +1,47 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Database Name="HeuristicLab.PluginStore" Class="PluginStoreClassesDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
+  <Connection Mode="AppSettings" ConnectionString="Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.Deployment.DataAccess.Properties.Settings" SettingsPropertyName="HeuristicLab_PluginStoreConnectionString" Provider="System.Data.SqlClient" />
+  <Table Name="dbo.Dependencies" Member="Dependencies">
+    <Type Name="Dependency">
+      <Column Name="PluginId" Type="System.Int64" DbType="BigInt NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+      <Column Name="DependencyId" Type="System.Int64" DbType="BigInt NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+      <Association Name="Plugin_Dependency" Member="Plugin" ThisKey="DependencyId" OtherKey="Id" Type="Plugin" IsForeignKey="true" />
+      <Association Name="Plugin_Dependency1" Member="Plugin1" ThisKey="PluginId" OtherKey="Id" Type="Plugin" IsForeignKey="true" />
+    </Type>
+  </Table>
+  <Table Name="dbo.ProductPlugin" Member="ProductPlugins">
+    <Type Name="ProductPlugin">
+      <Column Name="ProductId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
+      <Column Name="PluginId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
+      <Association Name="Plugin_ProductPlugin" Member="Plugin" ThisKey="PluginId" OtherKey="Id" Type="Plugin" IsForeignKey="true" />
+      <Association Name="Product_ProductPlugin" Member="Product" ThisKey="ProductId" OtherKey="Id" Type="Product" IsForeignKey="true" />
+    </Type>
+  </Table>
+  <Table Name="dbo.Plugin" Member="Plugins">
+    <Type Name="Plugin">
+      <Column Name="Id" Type="System.Int64" DbType="BigInt NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
+      <Column Name="Name" Type="System.String" DbType="NVarChar(300) NOT NULL" CanBeNull="false" />
+      <Column Name="Version" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
+      <Association Name="Plugin_Dependency" Member="Dependencies" ThisKey="Id" OtherKey="DependencyId" Type="Dependency" />
+      <Association Name="Plugin_Dependency1" Member="Dependencies1" ThisKey="Id" OtherKey="PluginId" Type="Dependency" />
+      <Association Name="Plugin_ProductPlugin" Member="ProductPlugins" ThisKey="Id" OtherKey="PluginId" Type="ProductPlugin" />
+      <Association Name="Plugin_PluginPackage" Member="PluginPackage" ThisKey="Id" OtherKey="PluginId" Type="PluginPackage" Cardinality="One" />
+    </Type>
+  </Table>
+  <Table Name="dbo.PluginPackage" Member="PluginPackages">
+    <Type Name="PluginPackage">
+      <Column Name="PluginId" Type="System.Int64" DbType="BigInt NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+      <Column Name="FileName" Type="System.String" DbType="Text NOT NULL" CanBeNull="false" UpdateCheck="Never" />
+      <Column Name="Data" Type="System.Data.Linq.Binary" DbType="Image NOT NULL" CanBeNull="false" UpdateCheck="Never" />
+      <Association Name="Plugin_PluginPackage" Member="Plugin" ThisKey="PluginId" OtherKey="Id" Type="Plugin" IsForeignKey="true" />
+    </Type>
+  </Table>
+  <Table Name="dbo.Product" Member="Products">
+    <Type Name="Product">
+      <Column Name="Id" Type="System.Int64" DbType="BigInt NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+      <Column Name="Name" Type="System.String" DbType="NVarChar(300) NOT NULL" CanBeNull="false" />
+      <Column Name="Version" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
+      <Association Name="Product_ProductPlugin" Member="ProductPlugins" ThisKey="Id" OtherKey="ProductId" Type="ProductPlugin" />
+    </Type>
+  </Table>
+</Database>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml.layout
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml.layout	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml.layout	(revision 2742)
@@ -0,0 +1,71 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.5" name="PluginStoreClasses">
+  <DataContextMoniker Name="/PluginStoreClassesDataContext" />
+  <nestedChildShapes>
+    <classShape Id="b23b573a-6180-4641-ba9f-1bd9637deeff" absoluteBounds="3.5, 2.625, 2, 1.1939925130208335">
+      <DataClassMoniker Name="/PluginStoreClassesDataContext/Dependency" />
+      <nestedChildShapes>
+        <elementListCompartment Id="0c1faa24-a5ab-4093-b697-127ff9dec797" absoluteBounds="3.515, 3.085, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <classShape Id="89bb29fc-6da5-4fb3-9df3-a33da1cc99f8" absoluteBounds="3.5, 0.75, 2, 1.1939925130208335">
+      <DataClassMoniker Name="/PluginStoreClassesDataContext/ProductPlugin" />
+      <nestedChildShapes>
+        <elementListCompartment Id="6eb3746b-0fec-4c95-8d53-03316bf2003a" absoluteBounds="3.515, 1.21, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <classShape Id="c8a72752-dc21-43bd-8c14-169c06461993" absoluteBounds="0.75, 3.625, 2, 1.3862939453125">
+      <DataClassMoniker Name="/PluginStoreClassesDataContext/Plugin" />
+      <nestedChildShapes>
+        <elementListCompartment Id="f85c30fe-b967-4cf5-ba0b-643fc01e8481" absoluteBounds="0.765, 4.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <classShape Id="3b48239e-4f4a-46d0-9962-fdc1173ba7bb" absoluteBounds="3.5, 6.625, 2, 1.3862939453125005">
+      <DataClassMoniker Name="/PluginStoreClassesDataContext/PluginPackage" />
+      <nestedChildShapes>
+        <elementListCompartment Id="e3a729ff-4cdf-44f7-b4da-0b4adc2bf9db" absoluteBounds="3.515, 7.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <classShape Id="2c5978b1-ebd4-4998-88f6-6f519a81c5b9" absoluteBounds="0.75, 1.5, 2, 1.3862939453125003">
+      <DataClassMoniker Name="/PluginStoreClassesDataContext/Product" />
+      <nestedChildShapes>
+        <elementListCompartment Id="bfbec163-1dd5-435a-92e5-4d99b65b567f" absoluteBounds="0.765, 1.96, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <associationConnector edgePoints="[(2.75 : 4.41514372916667); (3.88541416666667 : 4.41514372916667 : JumpStart); (4.05208083333333 : 4.41514372916667 : JumpEnd); (4.5 : 4.41514372916667); (4.5 : 3.81899251302083)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+      <AssociationMoniker Name="/PluginStoreClassesDataContext/Plugin/Plugin_Dependency" />
+      <nodes>
+        <classShapeMoniker Id="c8a72752-dc21-43bd-8c14-169c06461993" />
+        <classShapeMoniker Id="b23b573a-6180-4641-ba9f-1bd9637deeff" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(2.75 : 4.74447133723958); (3.9687475 : 4.74447133723958); (3.9687475 : 3.81899251302083)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+      <AssociationMoniker Name="/PluginStoreClassesDataContext/Plugin/Plugin_Dependency1" />
+      <nodes>
+        <classShapeMoniker Id="c8a72752-dc21-43bd-8c14-169c06461993" />
+        <classShapeMoniker Id="b23b573a-6180-4641-ba9f-1bd9637deeff" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(2.75 : 3.625); (3.125 : 3.25); (3.125 : 1.34699625651042); (3.5 : 1.34699625651042)]" fixedFrom="NotFixed" fixedTo="Algorithm">
+      <AssociationMoniker Name="/PluginStoreClassesDataContext/Plugin/Plugin_ProductPlugin" />
+      <nodes>
+        <classShapeMoniker Id="c8a72752-dc21-43bd-8c14-169c06461993" />
+        <classShapeMoniker Id="89bb29fc-6da5-4fb3-9df3-a33da1cc99f8" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(1.75 : 5.0112939453125); (1.75 : 7.31814697265625); (3.5 : 7.31814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+      <AssociationMoniker Name="/PluginStoreClassesDataContext/Plugin/Plugin_PluginPackage" />
+      <nodes>
+        <classShapeMoniker Id="c8a72752-dc21-43bd-8c14-169c06461993" />
+        <classShapeMoniker Id="3b48239e-4f4a-46d0-9962-fdc1173ba7bb" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(2.75 : 1.72199625651042); (3.04166666666667 : 1.72199625651042 : JumpStart); (3.20833333333333 : 1.72199625651042 : JumpEnd); (3.5 : 1.72199625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+      <AssociationMoniker Name="/PluginStoreClassesDataContext/Product/Product_ProductPlugin" />
+      <nodes>
+        <classShapeMoniker Id="2c5978b1-ebd4-4998-88f6-6f519a81c5b9" />
+        <classShapeMoniker Id="89bb29fc-6da5-4fb3-9df3-a33da1cc99f8" />
+      </nodes>
+    </associationConnector>
+  </nestedChildShapes>
+</ordesignerObjectsDiagram>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.designer.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.designer.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.designer.cs	(revision 2742)
@@ -0,0 +1,790 @@
+﻿#pragma warning disable 1591
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.4200
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Services.Deployment.DataAccess
+{
+	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;
+	
+	
+	[System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.PluginStore")]
+	public partial class PluginStoreClassesDataContext : System.Data.Linq.DataContext
+	{
+		
+		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
+		
+    #region Extensibility Method Definitions
+    partial void OnCreated();
+    partial void InsertDependency(Dependency instance);
+    partial void UpdateDependency(Dependency instance);
+    partial void DeleteDependency(Dependency instance);
+    partial void InsertPlugin(Plugin instance);
+    partial void UpdatePlugin(Plugin instance);
+    partial void DeletePlugin(Plugin instance);
+    partial void InsertPluginPackage(PluginPackage instance);
+    partial void UpdatePluginPackage(PluginPackage instance);
+    partial void DeletePluginPackage(PluginPackage instance);
+    partial void InsertProduct(Product instance);
+    partial void UpdateProduct(Product instance);
+    partial void DeleteProduct(Product instance);
+    #endregion
+		
+		public PluginStoreClassesDataContext() : 
+				base(global::HeuristicLab.Services.Deployment.DataAccess.Properties.Settings.Default.HeuristicLab_PluginStoreConnectionString, mappingSource)
+		{
+			OnCreated();
+		}
+		
+		public PluginStoreClassesDataContext(string connection) : 
+				base(connection, mappingSource)
+		{
+			OnCreated();
+		}
+		
+		public PluginStoreClassesDataContext(System.Data.IDbConnection connection) : 
+				base(connection, mappingSource)
+		{
+			OnCreated();
+		}
+		
+		public PluginStoreClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
+				base(connection, mappingSource)
+		{
+			OnCreated();
+		}
+		
+		public PluginStoreClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
+				base(connection, mappingSource)
+		{
+			OnCreated();
+		}
+		
+		public System.Data.Linq.Table<Dependency> Dependencies
+		{
+			get
+			{
+				return this.GetTable<Dependency>();
+			}
+		}
+		
+		public System.Data.Linq.Table<ProductPlugin> ProductPlugins
+		{
+			get
+			{
+				return this.GetTable<ProductPlugin>();
+			}
+		}
+		
+		public System.Data.Linq.Table<Plugin> Plugins
+		{
+			get
+			{
+				return this.GetTable<Plugin>();
+			}
+		}
+		
+		public System.Data.Linq.Table<PluginPackage> PluginPackages
+		{
+			get
+			{
+				return this.GetTable<PluginPackage>();
+			}
+		}
+		
+		public System.Data.Linq.Table<Product> Products
+		{
+			get
+			{
+				return this.GetTable<Product>();
+			}
+		}
+	}
+	
+	[Table(Name="dbo.Dependencies")]
+	public partial class Dependency : INotifyPropertyChanging, INotifyPropertyChanged
+	{
+		
+		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+		
+		private long _PluginId;
+		
+		private long _DependencyId;
+		
+		private EntityRef<Plugin> _Plugin;
+		
+		private EntityRef<Plugin> _Plugin1;
+		
+    #region Extensibility Method Definitions
+    partial void OnLoaded();
+    partial void OnValidate(System.Data.Linq.ChangeAction action);
+    partial void OnCreated();
+    partial void OnPluginIdChanging(long value);
+    partial void OnPluginIdChanged();
+    partial void OnDependencyIdChanging(long value);
+    partial void OnDependencyIdChanged();
+    #endregion
+		
+		public Dependency()
+		{
+			this._Plugin = default(EntityRef<Plugin>);
+			this._Plugin1 = default(EntityRef<Plugin>);
+			OnCreated();
+		}
+		
+		[Column(Storage="_PluginId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
+		public long PluginId
+		{
+			get
+			{
+				return this._PluginId;
+			}
+			set
+			{
+				if ((this._PluginId != value))
+				{
+					if (this._Plugin1.HasLoadedOrAssignedValue)
+					{
+						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+					}
+					this.OnPluginIdChanging(value);
+					this.SendPropertyChanging();
+					this._PluginId = value;
+					this.SendPropertyChanged("PluginId");
+					this.OnPluginIdChanged();
+				}
+			}
+		}
+		
+		[Column(Storage="_DependencyId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
+		public long DependencyId
+		{
+			get
+			{
+				return this._DependencyId;
+			}
+			set
+			{
+				if ((this._DependencyId != value))
+				{
+					if (this._Plugin.HasLoadedOrAssignedValue)
+					{
+						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+					}
+					this.OnDependencyIdChanging(value);
+					this.SendPropertyChanging();
+					this._DependencyId = value;
+					this.SendPropertyChanged("DependencyId");
+					this.OnDependencyIdChanged();
+				}
+			}
+		}
+		
+		[Association(Name="Plugin_Dependency", Storage="_Plugin", ThisKey="DependencyId", OtherKey="Id", IsForeignKey=true)]
+		public Plugin Plugin
+		{
+			get
+			{
+				return this._Plugin.Entity;
+			}
+			set
+			{
+				Plugin previousValue = this._Plugin.Entity;
+				if (((previousValue != value) 
+							|| (this._Plugin.HasLoadedOrAssignedValue == false)))
+				{
+					this.SendPropertyChanging();
+					if ((previousValue != null))
+					{
+						this._Plugin.Entity = null;
+						previousValue.Dependencies.Remove(this);
+					}
+					this._Plugin.Entity = value;
+					if ((value != null))
+					{
+						value.Dependencies.Add(this);
+						this._DependencyId = value.Id;
+					}
+					else
+					{
+						this._DependencyId = default(long);
+					}
+					this.SendPropertyChanged("Plugin");
+				}
+			}
+		}
+		
+		[Association(Name="Plugin_Dependency1", Storage="_Plugin1", ThisKey="PluginId", OtherKey="Id", IsForeignKey=true)]
+		public Plugin Plugin1
+		{
+			get
+			{
+				return this._Plugin1.Entity;
+			}
+			set
+			{
+				Plugin previousValue = this._Plugin1.Entity;
+				if (((previousValue != value) 
+							|| (this._Plugin1.HasLoadedOrAssignedValue == false)))
+				{
+					this.SendPropertyChanging();
+					if ((previousValue != null))
+					{
+						this._Plugin1.Entity = null;
+						previousValue.Dependencies1.Remove(this);
+					}
+					this._Plugin1.Entity = value;
+					if ((value != null))
+					{
+						value.Dependencies1.Add(this);
+						this._PluginId = value.Id;
+					}
+					else
+					{
+						this._PluginId = default(long);
+					}
+					this.SendPropertyChanged("Plugin1");
+				}
+			}
+		}
+		
+		public event PropertyChangingEventHandler PropertyChanging;
+		
+		public event PropertyChangedEventHandler PropertyChanged;
+		
+		protected virtual void SendPropertyChanging()
+		{
+			if ((this.PropertyChanging != null))
+			{
+				this.PropertyChanging(this, emptyChangingEventArgs);
+			}
+		}
+		
+		protected virtual void SendPropertyChanged(String propertyName)
+		{
+			if ((this.PropertyChanged != null))
+			{
+				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+			}
+		}
+	}
+	
+	[Table(Name="dbo.ProductPlugin")]
+	public partial class ProductPlugin
+	{
+		
+		private long _ProductId;
+		
+		private long _PluginId;
+		
+		public ProductPlugin()
+		{
+		}
+		
+		[Column(Storage="_ProductId", DbType="BigInt NOT NULL")]
+		public long ProductId
+		{
+			get
+			{
+				return this._ProductId;
+			}
+			set
+			{
+				if ((this._ProductId != value))
+				{
+					this._ProductId = value;
+				}
+			}
+		}
+		
+		[Column(Storage="_PluginId", DbType="BigInt NOT NULL")]
+		public long PluginId
+		{
+			get
+			{
+				return this._PluginId;
+			}
+			set
+			{
+				if ((this._PluginId != value))
+				{
+					this._PluginId = value;
+				}
+			}
+		}
+	}
+	
+	[Table(Name="dbo.Plugin")]
+	public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged
+	{
+		
+		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+		
+		private long _Id;
+		
+		private string _Name;
+		
+		private string _Version;
+		
+		private EntitySet<Dependency> _Dependencies;
+		
+		private EntitySet<Dependency> _Dependencies1;
+		
+		private EntityRef<PluginPackage> _PluginPackage;
+		
+    #region Extensibility Method Definitions
+    partial void OnLoaded();
+    partial void OnValidate(System.Data.Linq.ChangeAction action);
+    partial void OnCreated();
+    partial void OnIdChanging(long value);
+    partial void OnIdChanged();
+    partial void OnNameChanging(string value);
+    partial void OnNameChanged();
+    partial void OnVersionChanging(string value);
+    partial void OnVersionChanged();
+    #endregion
+		
+		public Plugin()
+		{
+			this._Dependencies = new EntitySet<Dependency>(new Action<Dependency>(this.attach_Dependencies), new Action<Dependency>(this.detach_Dependencies));
+			this._Dependencies1 = new EntitySet<Dependency>(new Action<Dependency>(this.attach_Dependencies1), new Action<Dependency>(this.detach_Dependencies1));
+			this._PluginPackage = default(EntityRef<PluginPackage>);
+			OnCreated();
+		}
+		
+		[Column(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
+		public long Id
+		{
+			get
+			{
+				return this._Id;
+			}
+			set
+			{
+				if ((this._Id != value))
+				{
+					this.OnIdChanging(value);
+					this.SendPropertyChanging();
+					this._Id = value;
+					this.SendPropertyChanged("Id");
+					this.OnIdChanged();
+				}
+			}
+		}
+		
+		[Column(Storage="_Name", DbType="NVarChar(300) NOT NULL", CanBeNull=false)]
+		public string Name
+		{
+			get
+			{
+				return this._Name;
+			}
+			set
+			{
+				if ((this._Name != value))
+				{
+					this.OnNameChanging(value);
+					this.SendPropertyChanging();
+					this._Name = value;
+					this.SendPropertyChanged("Name");
+					this.OnNameChanged();
+				}
+			}
+		}
+		
+		[Column(Storage="_Version", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+		public string Version
+		{
+			get
+			{
+				return this._Version;
+			}
+			set
+			{
+				if ((this._Version != value))
+				{
+					this.OnVersionChanging(value);
+					this.SendPropertyChanging();
+					this._Version = value;
+					this.SendPropertyChanged("Version");
+					this.OnVersionChanged();
+				}
+			}
+		}
+		
+		[Association(Name="Plugin_Dependency", Storage="_Dependencies", ThisKey="Id", OtherKey="DependencyId")]
+		public EntitySet<Dependency> Dependencies
+		{
+			get
+			{
+				return this._Dependencies;
+			}
+			set
+			{
+				this._Dependencies.Assign(value);
+			}
+		}
+		
+		[Association(Name="Plugin_Dependency1", Storage="_Dependencies1", ThisKey="Id", OtherKey="PluginId")]
+		public EntitySet<Dependency> Dependencies1
+		{
+			get
+			{
+				return this._Dependencies1;
+			}
+			set
+			{
+				this._Dependencies1.Assign(value);
+			}
+		}
+		
+		[Association(Name="Plugin_PluginPackage", Storage="_PluginPackage", ThisKey="Id", OtherKey="PluginId", IsUnique=true, IsForeignKey=false)]
+		public PluginPackage PluginPackage
+		{
+			get
+			{
+				return this._PluginPackage.Entity;
+			}
+			set
+			{
+				PluginPackage previousValue = this._PluginPackage.Entity;
+				if (((previousValue != value) 
+							|| (this._PluginPackage.HasLoadedOrAssignedValue == false)))
+				{
+					this.SendPropertyChanging();
+					if ((previousValue != null))
+					{
+						this._PluginPackage.Entity = null;
+						previousValue.Plugin = null;
+					}
+					this._PluginPackage.Entity = value;
+					if ((value != null))
+					{
+						value.Plugin = this;
+					}
+					this.SendPropertyChanged("PluginPackage");
+				}
+			}
+		}
+		
+		public event PropertyChangingEventHandler PropertyChanging;
+		
+		public event PropertyChangedEventHandler PropertyChanged;
+		
+		protected virtual void SendPropertyChanging()
+		{
+			if ((this.PropertyChanging != null))
+			{
+				this.PropertyChanging(this, emptyChangingEventArgs);
+			}
+		}
+		
+		protected virtual void SendPropertyChanged(String propertyName)
+		{
+			if ((this.PropertyChanged != null))
+			{
+				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+			}
+		}
+		
+		private void attach_Dependencies(Dependency entity)
+		{
+			this.SendPropertyChanging();
+			entity.Plugin = this;
+		}
+		
+		private void detach_Dependencies(Dependency entity)
+		{
+			this.SendPropertyChanging();
+			entity.Plugin = null;
+		}
+		
+		private void attach_Dependencies1(Dependency entity)
+		{
+			this.SendPropertyChanging();
+			entity.Plugin1 = this;
+		}
+		
+		private void detach_Dependencies1(Dependency entity)
+		{
+			this.SendPropertyChanging();
+			entity.Plugin1 = null;
+		}
+	}
+	
+	[Table(Name="dbo.PluginPackage")]
+	public partial class PluginPackage : INotifyPropertyChanging, INotifyPropertyChanged
+	{
+		
+		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+		
+		private long _PluginId;
+		
+		private string _FileName;
+		
+		private System.Data.Linq.Binary _Data;
+		
+		private EntityRef<Plugin> _Plugin;
+		
+    #region Extensibility Method Definitions
+    partial void OnLoaded();
+    partial void OnValidate(System.Data.Linq.ChangeAction action);
+    partial void OnCreated();
+    partial void OnPluginIdChanging(long value);
+    partial void OnPluginIdChanged();
+    partial void OnFileNameChanging(string value);
+    partial void OnFileNameChanged();
+    partial void OnDataChanging(System.Data.Linq.Binary value);
+    partial void OnDataChanged();
+    #endregion
+		
+		public PluginPackage()
+		{
+			this._Plugin = default(EntityRef<Plugin>);
+			OnCreated();
+		}
+		
+		[Column(Storage="_PluginId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
+		public long PluginId
+		{
+			get
+			{
+				return this._PluginId;
+			}
+			set
+			{
+				if ((this._PluginId != value))
+				{
+					if (this._Plugin.HasLoadedOrAssignedValue)
+					{
+						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+					}
+					this.OnPluginIdChanging(value);
+					this.SendPropertyChanging();
+					this._PluginId = value;
+					this.SendPropertyChanged("PluginId");
+					this.OnPluginIdChanged();
+				}
+			}
+		}
+		
+		[Column(Storage="_FileName", DbType="Text NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
+		public string FileName
+		{
+			get
+			{
+				return this._FileName;
+			}
+			set
+			{
+				if ((this._FileName != value))
+				{
+					this.OnFileNameChanging(value);
+					this.SendPropertyChanging();
+					this._FileName = value;
+					this.SendPropertyChanged("FileName");
+					this.OnFileNameChanged();
+				}
+			}
+		}
+		
+		[Column(Storage="_Data", DbType="Image NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
+		public System.Data.Linq.Binary Data
+		{
+			get
+			{
+				return this._Data;
+			}
+			set
+			{
+				if ((this._Data != value))
+				{
+					this.OnDataChanging(value);
+					this.SendPropertyChanging();
+					this._Data = value;
+					this.SendPropertyChanged("Data");
+					this.OnDataChanged();
+				}
+			}
+		}
+		
+		[Association(Name="Plugin_PluginPackage", Storage="_Plugin", ThisKey="PluginId", OtherKey="Id", IsForeignKey=true)]
+		public Plugin Plugin
+		{
+			get
+			{
+				return this._Plugin.Entity;
+			}
+			set
+			{
+				Plugin previousValue = this._Plugin.Entity;
+				if (((previousValue != value) 
+							|| (this._Plugin.HasLoadedOrAssignedValue == false)))
+				{
+					this.SendPropertyChanging();
+					if ((previousValue != null))
+					{
+						this._Plugin.Entity = null;
+						previousValue.PluginPackage = null;
+					}
+					this._Plugin.Entity = value;
+					if ((value != null))
+					{
+						value.PluginPackage = this;
+						this._PluginId = value.Id;
+					}
+					else
+					{
+						this._PluginId = default(long);
+					}
+					this.SendPropertyChanged("Plugin");
+				}
+			}
+		}
+		
+		public event PropertyChangingEventHandler PropertyChanging;
+		
+		public event PropertyChangedEventHandler PropertyChanged;
+		
+		protected virtual void SendPropertyChanging()
+		{
+			if ((this.PropertyChanging != null))
+			{
+				this.PropertyChanging(this, emptyChangingEventArgs);
+			}
+		}
+		
+		protected virtual void SendPropertyChanged(String propertyName)
+		{
+			if ((this.PropertyChanged != null))
+			{
+				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+			}
+		}
+	}
+	
+	[Table(Name="dbo.Product")]
+	public partial class Product : INotifyPropertyChanging, INotifyPropertyChanged
+	{
+		
+		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+		
+		private long _Id;
+		
+		private string _Name;
+		
+		private string _Version;
+		
+    #region Extensibility Method Definitions
+    partial void OnLoaded();
+    partial void OnValidate(System.Data.Linq.ChangeAction action);
+    partial void OnCreated();
+    partial void OnIdChanging(long value);
+    partial void OnIdChanged();
+    partial void OnNameChanging(string value);
+    partial void OnNameChanged();
+    partial void OnVersionChanging(string value);
+    partial void OnVersionChanged();
+    #endregion
+		
+		public Product()
+		{
+			OnCreated();
+		}
+		
+		[Column(Storage="_Id", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
+		public long Id
+		{
+			get
+			{
+				return this._Id;
+			}
+			set
+			{
+				if ((this._Id != value))
+				{
+					this.OnIdChanging(value);
+					this.SendPropertyChanging();
+					this._Id = value;
+					this.SendPropertyChanged("Id");
+					this.OnIdChanged();
+				}
+			}
+		}
+		
+		[Column(Storage="_Name", DbType="NVarChar(300) NOT NULL", CanBeNull=false)]
+		public string Name
+		{
+			get
+			{
+				return this._Name;
+			}
+			set
+			{
+				if ((this._Name != value))
+				{
+					this.OnNameChanging(value);
+					this.SendPropertyChanging();
+					this._Name = value;
+					this.SendPropertyChanged("Name");
+					this.OnNameChanged();
+				}
+			}
+		}
+		
+		[Column(Storage="_Version", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+		public string Version
+		{
+			get
+			{
+				return this._Version;
+			}
+			set
+			{
+				if ((this._Version != value))
+				{
+					this.OnVersionChanging(value);
+					this.SendPropertyChanging();
+					this._Version = value;
+					this.SendPropertyChanged("Version");
+					this.OnVersionChanged();
+				}
+			}
+		}
+		
+		public event PropertyChangingEventHandler PropertyChanging;
+		
+		public event PropertyChangedEventHandler PropertyChanged;
+		
+		protected virtual void SendPropertyChanging()
+		{
+			if ((this.PropertyChanging != null))
+			{
+				this.PropertyChanging(this, emptyChangingEventArgs);
+			}
+		}
+		
+		protected virtual void SendPropertyChanged(String propertyName)
+		{
+			if ((this.PropertyChanged != null))
+			{
+				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+			}
+		}
+	}
+}
+#pragma warning restore 1591
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/ProductDescription.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/ProductDescription.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/ProductDescription.cs	(revision 2742)
@@ -0,0 +1,49 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.Deployment.DataAccess {
+  [DataContract(Name = "ProductDescription")]
+  public class ProductDescription {
+
+    [DataMember(Name = "Id")]
+    private long id;
+    internal long Id {
+      get { return id; }
+      set { id = value; }
+    }
+
+    [DataMember(Name = "Name")]
+    private string name;
+    public string Name {
+      get { return name; }
+    }
+
+    [DataMember(Name = "Version")]
+    private Version version;
+    public Version Version {
+      get { return version; }
+    }
+
+    [DataMember(Name = "Plugins")]
+    private IEnumerable<PluginDescription> plugins;
+    public IEnumerable<PluginDescription> Plugins {
+      get { return plugins; }
+    }
+
+    internal ProductDescription(long id, string name, Version version, IEnumerable<PluginDescription> plugins) {
+      this.id = id;
+      this.name = name;
+      this.version = version;
+      this.plugins = new List<PluginDescription>(plugins).AsReadOnly();
+    }
+
+    public ProductDescription(string name, Version version, IEnumerable<PluginDescription> plugins)
+      : this(0, name, version, plugins) {
+    }
+
+    public ProductDescription(string name, Version version) : this(name, version, Enumerable.Empty<PluginDescription>()) { }
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/AssemblyInfo.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/AssemblyInfo.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/AssemblyInfo.cs	(revision 2742)
@@ -0,0 +1,36 @@
+﻿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("HeuristicLab.Services.Deployment.DataAccess")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab.Services.Deployment.DataAccess")]
+[assembly: AssemblyCopyright("Copyright ©  2010")]
+[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("8716dca8-fe60-472e-a331-c0b534557e01")]
+
+// 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")]
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/Settings.Designer.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/Settings.Designer.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/Settings.Designer.cs	(revision 2742)
@@ -0,0 +1,37 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.4200
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Services.Deployment.DataAccess.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
+        [global::System.Configuration.DefaultSettingValueAttribute("Data Source=HEUREKA01\\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integra" +
+            "ted Security=True")]
+        public string HeuristicLab_PluginStoreConnectionString {
+            get {
+                return ((string)(this["HeuristicLab_PluginStoreConnectionString"]));
+            }
+        }
+    }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/Settings.settings
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/Settings.settings	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/Properties/Settings.settings	(revision 2742)
@@ -0,0 +1,14 @@
+﻿<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HeuristicLab.Services.Deployment.DataAccess.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="HeuristicLab_PluginStoreConnectionString" Type="(Connection string)" Scope="Application">
+      <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
+&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
+  &lt;ConnectionString&gt;Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True&lt;/ConnectionString&gt;
+  &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
+&lt;/SerializableConnectionString&gt;</DesignTimeValue>
+      <Value Profile="(Default)">Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True</Value>
+    </Setting>
+  </Settings>
+</SettingsFile>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/app.config
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/app.config	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/app.config	(revision 2742)
@@ -0,0 +1,10 @@
+﻿<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <configSections>
+    </configSections>
+    <connectionStrings>
+        <add name="HeuristicLab.Services.Deployment.DataAccess.Properties.Settings.HeuristicLab_PluginStoreConnectionString"
+            connectionString="Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True"
+            providerName="System.Data.SqlClient" />
+    </connectionStrings>
+</configuration>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/HeuristicLab.Services.Deployment.Test.csproj
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/HeuristicLab.Services.Deployment.Test.csproj	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/HeuristicLab.Services.Deployment.Test.csproj	(revision 2742)
@@ -0,0 +1,75 @@
+﻿<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3F4779E4-4935-478C-A67E-3F5965F58E99}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Services.Deployment.Test</RootNamespace>
+    <AssemblyName>HeuristicLab.Services.Deployment.Test</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Runtime.Serialization">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="PluginStoreTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="AuthoringTests.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Services.Deployment.DataAccess\HeuristicLab.Services.Deployment.DataAccess.csproj">
+      <Project>{EBEBA863-DD05-4331-BE25-5758B15F7407}</Project>
+      <Name>HeuristicLab.Services.Deployment.DataAccess</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/PluginStoreTest.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/PluginStoreTest.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/PluginStoreTest.cs	(revision 2742)
@@ -0,0 +1,447 @@
+﻿using HeuristicLab.Services.Deployment.DataAccess;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+using System.Diagnostics;
+
+namespace HeuristicLab.Services.Deployment.Test {
+
+
+  /// <summary>
+  ///This is a test class for PluginStoreTest and is intended
+  ///to contain all PluginStoreTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PluginStoreTest {
+
+    private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #region Additional test attributes
+    // 
+    //You can use the following additional attributes as you write your tests:
+    //
+    //Use ClassInitialize to run code before running the first test in the class
+    //[ClassInitialize()]
+    //public static void MyClassInitialize(TestContext testContext)
+    //{
+    //}
+    //
+    //Use ClassCleanup to run code after all tests in a class have run
+    //[ClassCleanup()]
+    //public static void MyClassCleanup()
+    //{
+    //}
+    //
+    //Use TestInitialize to run code before running each test
+    //[TestInitialize()]
+    //public void MyTestInitialize()
+    //{
+    //}
+    //
+    //Use TestCleanup to run code after each test has run
+    //[TestCleanup()]
+    //public void MyTestCleanup()
+    //{
+    //}
+    //
+    #endregion
+
+
+    /// <summary>
+    ///A test for PluginFile
+    ///</summary>
+    [TestMethod()]
+    public void PluginFileTest() {
+      PluginStore target = new PluginStore();
+      #region insert and retrieve a plugin file
+      int oldCount = target.Plugins.Count();
+      // store a new entry in the db
+      string name = Guid.NewGuid().ToString();
+      target.Persist(new PluginDescription(name, new Version(0, 1)), enc.GetBytes("Zipped " + name));
+      int newCount = target.Plugins.Count();
+      // make sure the new entry was added to the db
+      Assert.AreEqual(oldCount + 1, newCount);
+
+      // get matching description from db and try to retrieve the stored file 
+      PluginDescription pluginDescription = target.Plugins.Where(p => p.Name == name).Single();
+      byte[] expected = enc.GetBytes("Zipped " + name);
+      byte[] actual = target.PluginFile(pluginDescription);
+      // check retrieved file
+      Assert.AreEqual(expected.Length, actual.Length);
+      for (int i = 0; i < expected.Length; i++) {
+        Assert.AreEqual(expected[i], actual[i]);
+      }
+      #endregion
+    }
+
+    /// <summary>
+    ///A test for Persist
+    ///</summary>
+    [TestMethod()]
+    public void PersistPluginTest() {
+      var vers01 = new Version(0, 1);
+      PluginStore target = new PluginStore();
+
+      #region persist single plugin without dependencies
+      {
+        string name = Guid.NewGuid().ToString();
+        int oldCount = target.Plugins.Count();
+        PluginDescription pluginDescription = new PluginDescription(name, vers01);
+        byte[] pluginPackage = enc.GetBytes("Zipped " + name);
+        target.Persist(pluginDescription, pluginPackage);
+        int newCount = target.Plugins.Count();
+        Assert.AreEqual(oldCount + 1, newCount);
+      }
+      #endregion
+
+      #region persist a product with same name and version as an existent product
+      {
+        string name = Guid.NewGuid().ToString();
+        int oldCount = target.Plugins.Count();
+        PluginDescription pluginDescription = new PluginDescription(name, vers01);
+        byte[] pluginPackage = enc.GetBytes("Zipped " + name);
+        target.Persist(pluginDescription, pluginPackage);
+        int newCount = target.Plugins.Count();
+        Assert.AreEqual(oldCount + 1, newCount);
+
+        // insert same name and version
+        oldCount = target.Plugins.Count();
+        pluginDescription = new PluginDescription(name, vers01);
+        pluginPackage = enc.GetBytes("Zipped " + name);
+        target.Persist(pluginDescription, pluginPackage);
+        newCount = target.Plugins.Count();
+        // make sure old entry was updated
+        Assert.AreEqual(oldCount, newCount);
+
+        // insert new with different version
+        oldCount = target.Plugins.Count();
+        pluginDescription = new PluginDescription(name, new Version(0, 2));
+        pluginPackage = enc.GetBytes("Zipped " + name);
+        target.Persist(pluginDescription, pluginPackage);
+        newCount = target.Plugins.Count();
+        // make sure a new entry was created
+        Assert.AreEqual(oldCount + 1, newCount);
+      }
+      #endregion
+
+      #region persist a plugin with an already persisted dependency
+      {
+        string name = Guid.NewGuid().ToString();
+        PluginDescription dependency = new PluginDescription(name, vers01);
+        // insert dependency first
+        target.Persist(dependency, enc.GetBytes("Zipped " + name));
+
+        // persist another plugin that has a dependency on the first plugin
+        string name2 = Guid.NewGuid().ToString();
+        int oldCount = target.Plugins.Count();
+
+        PluginDescription newEntity = new PluginDescription(name2, vers01, Enumerable.Repeat(dependency, 1));
+        byte[] newEntityPackage = enc.GetBytes("Zipped " + name2);
+        target.Persist(newEntity, newEntityPackage);
+        int newCount = target.Plugins.Count();
+        Assert.AreEqual(oldCount + 1, newCount); // only one new plugin should be added
+
+        // retrieve second plugin and check dependencies
+        newEntity = target.Plugins.Where(p => p.Name == name2).Single();
+        Assert.AreEqual(newEntity.Dependencies.Count(), 1);
+        Assert.AreEqual(newEntity.Dependencies.First().Name, name);
+      }
+      #endregion
+
+      #region try to persist a new  plugin with a non-existant dependency and check the expected exception
+      {
+        // try to persist a new plugin with a non-existant dependency
+        try {
+          string pluginName = Guid.NewGuid().ToString();
+          string dependencyName = Guid.NewGuid().ToString();
+          var dependency = new PluginDescription(dependencyName, vers01);
+          var newEntity = new PluginDescription(pluginName, vers01, Enumerable.Repeat(dependency, 1));
+          target.Persist(newEntity, enc.GetBytes("Zipped " + pluginName));
+          Assert.Fail("persist should fail with ArgumentException");
+        }
+        catch (ArgumentException e) {
+          // this is expected
+          Assert.IsTrue(true, "expected exception");
+        }
+      }
+      #endregion
+
+      #region update the plugin file of an existing plugin
+      {
+        // insert new plugin
+        string pluginName = Guid.NewGuid().ToString();
+        var newPlugin = new PluginDescription(pluginName, vers01);
+        target.Persist(newPlugin, enc.GetBytes("Zipped " + pluginName));
+
+        // update the plugin file
+        byte[] expected = enc.GetBytes("Zipped2 " + pluginName);
+        target.Persist(newPlugin, expected);
+        // check if the updated file is returned
+        byte[] actual = target.PluginFile(newPlugin);
+        Assert.AreEqual(expected, actual);
+      }
+      #endregion
+
+      #region update the dependencies of an existing plugin
+      {
+        string dependency1Name = Guid.NewGuid().ToString();
+        var newDependency1 = new PluginDescription(dependency1Name, vers01);
+        target.Persist(newDependency1, enc.GetBytes("Zipped " + dependency1Name));
+
+        string pluginName = Guid.NewGuid().ToString();
+        var newPlugin = new PluginDescription(pluginName, vers01, Enumerable.Repeat(newDependency1, 1));
+        target.Persist(newPlugin, enc.GetBytes("Zipped " + pluginName));
+
+        // retrieve plugin
+        var dbPlugin = target.Plugins.Where(p => p.Name == pluginName).Single();
+        Assert.AreEqual(dbPlugin.Dependencies.Count(), 1);
+        Assert.AreEqual(dbPlugin.Dependencies.First().Name, dependency1Name);
+
+        // change dependencies 
+        string dependency2Name = Guid.NewGuid().ToString();
+        var newDependency2 = new PluginDescription(dependency2Name, vers01);
+        target.Persist(newDependency2, enc.GetBytes("Zipped " + pluginName));
+
+        newPlugin = new PluginDescription(pluginName, vers01, new PluginDescription[] { newDependency1, newDependency2 });
+        target.Persist(newPlugin, enc.GetBytes("Zipped " + pluginName));
+        // retrieve plugin
+        dbPlugin = target.Plugins.Where(p => p.Name == pluginName).Single();
+        Assert.AreEqual(dbPlugin.Dependencies.Count(), 2);
+      }
+      #endregion
+
+      #region try to insert a plugin that references the same dependency twice and check if the correct exception is thrown
+      {
+        string depName = Guid.NewGuid().ToString();
+        var depPlugin = new PluginDescription(depName, vers01);
+        target.Persist(depPlugin, enc.GetBytes("Zipped " + depName));
+
+        // insert new plugin
+        string pluginName = Guid.NewGuid().ToString();
+        var plugin = new PluginDescription(pluginName, vers01, new PluginDescription[] { depPlugin, depPlugin });
+        try {
+          target.Persist(depPlugin, enc.GetBytes("Zipped " + depName));
+          Assert.Fail("Expected ArgumentException");
+        }
+        catch (ArgumentException) {
+          Assert.IsTrue(true, "Exception thrown as expected");
+        }
+      }
+      #endregion
+    }
+
+    /// <summary>
+    ///A test for Persist
+    ///</summary>
+    [TestMethod()]
+    public void PersistProductTest() {
+      Version vers01 = new Version(0, 1);
+      PluginStore target = new PluginStore();
+
+      #region persist a product without plugins to the db
+      {
+        string prodName = Guid.NewGuid().ToString();
+        int oldCount = target.Products.Count();
+        ProductDescription product = new ProductDescription(prodName, vers01);
+        target.Persist(product);
+        int newCount = target.Products.Count();
+        Assert.AreEqual(oldCount + 1, newCount);
+      }
+      #endregion
+
+      #region persist a product with the same name and version as an existant product
+      {
+        string prodName = Guid.NewGuid().ToString();
+        int oldCount = target.Products.Count();
+        ProductDescription product = new ProductDescription(prodName, vers01);
+        target.Persist(product);
+        int newCount = target.Products.Count();
+        Assert.AreEqual(oldCount + 1, newCount);
+
+        // write a product with same name and version
+        oldCount = target.Products.Count();
+        product = new ProductDescription(prodName, vers01);
+        target.Persist(product);
+        newCount = target.Products.Count();
+
+        // make sure that the old entry was updated
+        Assert.AreEqual(oldCount, newCount);
+
+        // write a product with same name and different version
+        oldCount = target.Products.Count();
+        product = new ProductDescription(prodName, new Version(0, 2));
+        target.Persist(product);
+        newCount = target.Products.Count();
+
+        // make sure that a new entry was created
+        Assert.AreEqual(oldCount + 1, newCount);
+      }
+      #endregion
+
+      #region try to persist a product referencing an non-existant plugin and check the expected exception
+      {
+        // try to persist a product referencing an non-existant plugin
+        string prodName = Guid.NewGuid().ToString();
+        string pluginName = Guid.NewGuid().ToString();
+        var plugin = new PluginDescription(pluginName, vers01);
+        var product = new ProductDescription(prodName, vers01, Enumerable.Repeat(plugin, 1));
+        try {
+          target.Persist(product);
+          Assert.Fail("persist should fail with ArgumentException");
+        }
+        catch (ArgumentException e) {
+          // this is expected
+          Assert.IsTrue(true, "expected exception");
+        }
+      }
+      #endregion
+
+      #region persist a product with a single plugin reference
+      {
+        string prodName = Guid.NewGuid().ToString();
+        string pluginName = Guid.NewGuid().ToString();
+        var plugin = new PluginDescription(pluginName, vers01);
+        var product = new ProductDescription(prodName, vers01, Enumerable.Repeat(plugin, 1));
+
+        // persist the plugin first
+        int oldCount = target.Products.Count();
+        target.Persist(plugin, enc.GetBytes("Zipped " + plugin.Name));
+        target.Persist(product);
+        int newCount = target.Products.Count();
+        // make sure the store went through
+        Assert.AreEqual(oldCount + 1, newCount);
+        // retrieve the product and check if the plugin list was stored/retrieved correctly
+        var dbProd = target.Products.Where(p => p.Name == prodName).Single();
+        Assert.AreEqual(dbProd.Plugins.Count(), 1);
+        Assert.AreEqual(dbProd.Plugins.First().Name, pluginName);
+      }
+      #endregion
+
+      #region update the plugin list of an existing product
+      {
+        string prodName = Guid.NewGuid().ToString();
+        string plugin1Name = Guid.NewGuid().ToString();
+        var plugin1 = new PluginDescription(plugin1Name, vers01);
+        var product = new ProductDescription(prodName, vers01, Enumerable.Repeat(plugin1, 1));
+
+        // persist the plugin first
+        int oldCount = target.Products.Count();
+        target.Persist(plugin1, enc.GetBytes("Zipped " + plugin1.Name));
+        target.Persist(product);
+        int newCount = target.Products.Count();
+        // make sure the store went through
+        Assert.AreEqual(oldCount + 1, newCount);
+
+        var plugin2Name = Guid.NewGuid().ToString();
+        var plugin2 = new PluginDescription(plugin2Name, vers01);
+        target.Persist(plugin2, enc.GetBytes("Zipped " + plugin2.Name));
+        product = new ProductDescription(prodName, vers01, new PluginDescription[] { plugin1, plugin2 });
+        oldCount = target.Products.Count();
+        target.Persist(product);
+        newCount = target.Products.Count();
+        // make sure that a new entry was not created
+        Assert.AreEqual(oldCount, newCount);
+
+        // check the plugin list of the product
+        var dbProduct = target.Products.Where(p => p.Name == prodName).Single();
+        Assert.AreEqual(dbProduct.Plugins.Count(), 2);
+      }
+      #endregion
+
+      #region insert a product which references the same plugin twice and check if the correct exception is thrown
+      {
+        string prodName = Guid.NewGuid().ToString();
+        string plugin1Name = Guid.NewGuid().ToString();
+        var plugin1 = new PluginDescription(plugin1Name, vers01);
+        var product = new ProductDescription(prodName, vers01, Enumerable.Repeat(plugin1, 2));
+
+        // persist the plugin first
+        int oldCount = target.Products.Count();
+        target.Persist(plugin1, enc.GetBytes("Zipped " + plugin1.Name));
+        target.Persist(product);
+        int newCount = target.Products.Count();
+        // make sure the store went through
+        Assert.AreEqual(oldCount + 1, newCount);
+
+        try {
+          target.Persist(product);
+          Assert.Fail("Expected ArgumentException");
+        }
+        catch (ArgumentException) {
+          Assert.IsTrue(true, "Expected exception was thrown.");
+        }
+      }
+      #endregion
+    }
+
+    [TestMethod]
+    public void InsertPluginPerformanceTest() {
+      int nPlugins = 100;
+      int maxDependencies = 10;
+      int avgZipFileLength = 32000;
+
+      var store = new PluginStore();
+      Version vers01 = new Version(0, 1);
+      // create a random byte array to represent file length
+      byte[] zippedConstant = new byte[avgZipFileLength];
+      Random r = new Random();
+      r.NextBytes(zippedConstant);
+
+      Stopwatch stopWatch = new Stopwatch();
+      stopWatch.Start();
+      // create plugins
+      List<PluginDescription> plugins = new List<PluginDescription>();
+      for (int i = 0; i < nPlugins; i++) {
+        string name = Guid.NewGuid().ToString();
+        var dependencies = store.Plugins;
+        if (dependencies.Count() > maxDependencies) dependencies = dependencies.Take(maxDependencies);
+        var plugin = new PluginDescription(name, vers01, dependencies);
+        store.Persist(plugin, zippedConstant);
+        plugins.Add(plugin);
+      }
+      stopWatch.Stop();
+      Assert.Inconclusive("Created " + nPlugins + " plugins in " + stopWatch.ElapsedMilliseconds +
+        " ms (" + (double)stopWatch.ElapsedMilliseconds / nPlugins + " ms / plugin )");
+    }
+    [TestMethod]
+    public void InsertProductPerformanceTest() {
+      int nProducts = 50;
+      int avgProductPlugins = 30;
+
+      var store = new PluginStore();
+      Version vers01 = new Version(0, 1);
+      Stopwatch stopWatch = new Stopwatch();
+      Random r = new Random();
+      var plugins = store.Plugins.ToList();
+      stopWatch.Start();
+      // create products
+      for (int i = 0; i < nProducts; i++) {
+        string name = Guid.NewGuid().ToString();
+        List<PluginDescription> prodPlugins = new List<PluginDescription>();
+        for (int j = 0; j < avgProductPlugins; j++) {
+          prodPlugins.Add(plugins[r.Next(0, plugins.Count)]);
+        }
+        var prod = new ProductDescription(name, vers01, prodPlugins);
+        store.Persist(prod);
+      }
+      stopWatch.Stop();
+      Assert.Inconclusive("Created " + nProducts + " products in " + stopWatch.ElapsedMilliseconds +
+        " ms (" + (double)stopWatch.ElapsedMilliseconds / nProducts + " ms / product )");
+    }
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/Properties/AssemblyInfo.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/Properties/AssemblyInfo.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.Test/Properties/AssemblyInfo.cs	(revision 2742)
@@ -0,0 +1,35 @@
+﻿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("HeuristicLab.Services.Deployment.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab.Services.Deployment.Test")]
+[assembly: AssemblyCopyright("Copyright ©  2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM componenets.  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("eb33cb51-a150-4fe0-894f-95370d01f94b")]
+
+// 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 Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Admin.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Admin.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Admin.cs	(revision 2742)
@@ -0,0 +1,26 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.Text;
+using HeuristicLab.Services.Deployment.DataAccess;
+
+namespace HeuristicLab.Services.Deployment {
+  // NOTE: If you change the class name "Admin" here, you must also update the reference to "Admin" in App.config.
+  public class Admin : IAdmin {
+    #region IAdmin Members
+
+    public void StoreProduct(ProductDescription product) {
+      var store = new PluginStore();
+      store.Persist(product);
+    }
+
+    public void DeployPlugin(PluginDescription plugin, byte[] zipFile) {
+      var store = new PluginStore();
+      store.Persist(plugin, zipFile);
+    }
+
+    #endregion
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/App.config
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/App.config	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/App.config	(revision 2742)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+  <configSections>
+  </configSections>
+  <connectionStrings>
+    <add name="HeuristicLab.Services.Deployment.Properties.Settings.HeuristicLab_PluginStoreConnectionString"
+      connectionString="Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True"
+      providerName="System.Data.SqlClient" />
+  </connectionStrings>
+  <system.web>
+    <compilation debug="true" />
+  </system.web>
+  <!-- When deploying the service library project, the content of the config file must be added to the host's 
+  app.config file. System.Configuration does not support config files for libraries. -->
+  <system.serviceModel>
+    <services>
+      <service behaviorConfiguration="HeuristicLab.Services.Deployment.UpdateBehavior"
+        name="HeuristicLab.Services.Deployment.Update">
+        <endpoint address="" binding="wsHttpBinding" contract="HeuristicLab.Services.Deployment.IUpdate">
+          <identity>
+            <dns value="localhost" />
+          </identity>
+        </endpoint>
+        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
+        <host>
+          <baseAddresses>
+            <add baseAddress="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Update/" />
+          </baseAddresses>
+        </host>
+      </service>
+      <service behaviorConfiguration="HeuristicLab.Services.Deployment.AdminBehavior"
+        name="HeuristicLab.Services.Deployment.Admin">
+        <endpoint address="" binding="wsHttpBinding" contract="HeuristicLab.Services.Deployment.IAdmin">
+          <identity>
+            <dns value="localhost" />
+          </identity>
+        </endpoint>
+        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
+        <host>
+          <baseAddresses>
+            <add baseAddress="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Admin/" />
+          </baseAddresses>
+        </host>
+      </service>
+    </services>
+    <behaviors>
+      <serviceBehaviors>
+        <behavior name="HeuristicLab.Services.Deployment.UpdateBehavior">
+          <serviceMetadata httpGetEnabled="true" />
+          <serviceDebug includeExceptionDetailInFaults="false" />
+        </behavior>
+        <behavior name="HeuristicLab.Services.Deployment.AdminBehavior">
+          <serviceMetadata httpGetEnabled="true" />
+          <serviceDebug includeExceptionDetailInFaults="false" />
+        </behavior>
+      </serviceBehaviors>
+    </behaviors>
+  </system.serviceModel>
+</configuration>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/HeuristicLab.Services.Deployment.csproj
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/HeuristicLab.Services.Deployment.csproj	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/HeuristicLab.Services.Deployment.csproj	(revision 2742)
@@ -0,0 +1,103 @@
+﻿<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Services.Deployment</RootNamespace>
+    <AssemblyName>HeuristicLab.Services.Deployment</AssemblyName>
+    <ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <StartArguments>/client:"WcfTestClient.exe"</StartArguments>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Data.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Runtime.Serialization">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.ServiceModel">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Admin.cs" />
+    <Compile Include="IAdmin.cs" />
+    <Compile Include="IUpdate.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+      <DependentUpon>Settings.settings</DependentUpon>
+    </Compile>
+    <Compile Include="Update.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <WCFMetadata Include="Service References\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Services.Deployment.DataAccess\HeuristicLab.Services.Deployment.DataAccess.csproj">
+      <Project>{EBEBA863-DD05-4331-BE25-5758B15F7407}</Project>
+      <Name>HeuristicLab.Services.Deployment.DataAccess</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{3D9AD99F-2412-4246-B90B-4EAA41C64699}">
+        <WcfProjectProperties>
+          <AutoStart>True</AutoStart>
+        </WcfProjectProperties>
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+</Project>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/IAdmin.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/IAdmin.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/IAdmin.cs	(revision 2742)
@@ -0,0 +1,19 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.Text;
+using HeuristicLab.Services.Deployment.DataAccess;
+
+namespace HeuristicLab.Services.Deployment {
+  // NOTE: If you change the interface name "IAdmin" here, you must also update the reference to "IAdmin" in App.config.
+  [ServiceContract]
+  public interface IAdmin {
+    [OperationContract]
+    void StoreProduct(ProductDescription product);
+
+    [OperationContract]
+    void DeployPlugin(PluginDescription plugin, byte[] zipFile);
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/IUpdate.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/IUpdate.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/IUpdate.cs	(revision 2742)
@@ -0,0 +1,20 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.Text;
+using HeuristicLab.Services.Deployment.DataAccess;
+
+namespace HeuristicLab.Services.Deployment {
+  // NOTE: If you change the interface name "IUpdate" here, you must also update the reference to "IUpdate" in App.config.
+  [ServiceContract]
+  public interface IUpdate {
+    [OperationContract]
+    byte[] GetPlugin(PluginDescription description);
+
+    [OperationContract]
+    IEnumerable<ProductDescription> GetProducts();
+
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/AssemblyInfo.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/AssemblyInfo.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/AssemblyInfo.cs	(revision 2742)
@@ -0,0 +1,36 @@
+﻿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("HeuristicLab.Services.Deployment")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab.Services.Deployment")]
+[assembly: AssemblyCopyright("Copyright ©  2010")]
+[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("227d8d28-de87-417c-8b61-f001a7850f5c")]
+
+// 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")]
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/Settings.Designer.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/Settings.Designer.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/Settings.Designer.cs	(revision 2742)
@@ -0,0 +1,37 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.4200
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Services.Deployment.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
+        [global::System.Configuration.DefaultSettingValueAttribute("Data Source=HEUREKA01\\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integra" +
+            "ted Security=True")]
+        public string HeuristicLab_PluginStoreConnectionString {
+            get {
+                return ((string)(this["HeuristicLab_PluginStoreConnectionString"]));
+            }
+        }
+    }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/Settings.settings
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/Settings.settings	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Properties/Settings.settings	(revision 2742)
@@ -0,0 +1,14 @@
+﻿<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HeuristicLab.Services.Deployment.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="HeuristicLab_PluginStoreConnectionString" Type="(Connection string)" Scope="Application">
+      <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
+&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
+  &lt;ConnectionString&gt;Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True&lt;/ConnectionString&gt;
+  &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
+&lt;/SerializableConnectionString&gt;</DesignTimeValue>
+      <Value Profile="(Default)">Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True</Value>
+    </Setting>
+  </Settings>
+</SettingsFile>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Update.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Update.cs	(revision 2742)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/Update.cs	(revision 2742)
@@ -0,0 +1,27 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.Text;
+using HeuristicLab.Services.Deployment.DataAccess;
+
+namespace HeuristicLab.Services.Deployment {
+  // NOTE: If you change the class name "Update" here, you must also update the reference to "Update" in App.config.
+  public class Update : IUpdate {
+    #region IUpdate Members
+
+    public byte[] GetPlugin(PluginDescription description) {
+      PluginStore store = new PluginStore();
+      return store.PluginFile(description);
+    }
+
+
+    public IEnumerable<ProductDescription> GetProducts() {
+      PluginStore store = new PluginStore();
+      return store.Products;
+    }
+
+    #endregion
+  }
+}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.sln
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.sln	(revision 2733)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.sln	(revision 2742)
@@ -4,14 +4,75 @@
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services", "HeuristicLab.Services\HeuristicLab.Services.csproj", "{62D88CDA-264B-4798-B17D-9B5D9C841356}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.PluginInfrastructure", "HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj", "{94186A6A-5176-4402-AE83-886557B53CCA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Deployment", "HeuristicLab.Services.Deployment\HeuristicLab.Services.Deployment.csproj", "{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Deployment.DataAccess", "HeuristicLab.Services.Deployment.DataAccess\HeuristicLab.Services.Deployment.DataAccess.csproj", "{EBEBA863-DD05-4331-BE25-5758B15F7407}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Deployment.Test", "HeuristicLab.Services.Deployment.Test\HeuristicLab.Services.Deployment.Test.csproj", "{3F4779E4-4935-478C-A67E-3F5965F58E99}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7FE8AABF-0F35-438B-970C-C27A97487AB2}"
+	ProjectSection(SolutionItems) = preProject
+		HeuristicLab.Services.vsmdi = HeuristicLab.Services.vsmdi
+		LocalTestRun.testrunconfig = LocalTestRun.testrunconfig
+	EndProjectSection
+EndProject
 Global
+	GlobalSection(TestCaseManagementSettings) = postSolution
+		CategoryFile = HeuristicLab.Services.vsmdi
+	EndGlobalSection
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Release|Any CPU.Build.0 = Release|Any CPU
+		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Release|x64.ActiveCfg = Release|Any CPU
+		{62D88CDA-264B-4798-B17D-9B5D9C841356}.Release|x86.ActiveCfg = Release|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x64.ActiveCfg = Debug|x64
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x64.Build.0 = Debug|x64
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x86.ActiveCfg = Debug|x86
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x86.Build.0 = Debug|x86
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|x64.ActiveCfg = Release|x64
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|x64.Build.0 = Release|x64
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|x86.ActiveCfg = Release|x86
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|x86.Build.0 = Release|x86
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|x64.ActiveCfg = Release|Any CPU
+		{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|x86.ActiveCfg = Release|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|x64.ActiveCfg = Release|Any CPU
+		{EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|x86.ActiveCfg = Release|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Release|x64.ActiveCfg = Release|Any CPU
+		{3F4779E4-4935-478C-A67E-3F5965F58E99}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/HeuristicLab.Services.csproj
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/HeuristicLab.Services.csproj	(revision 2733)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/HeuristicLab.Services.csproj	(revision 2742)
@@ -57,12 +57,7 @@
   </ItemGroup>
   <ItemGroup>
-    <Content Include="Service1.svc" />
     <Content Include="Web.config" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Service1.svc.cs">
-      <DependentUpon>Service1.svc</DependentUpon>
-    </Compile>
-    <Compile Include="IService1.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/Service1.svc
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/Service1.svc	(revision 2733)
+++ 	(revision )
@@ -1,1 +1,0 @@
-﻿<%@ ServiceHost Language="C#" Debug="true" Service="HeuristicLab.Services.Service1" CodeBehind="Service1.svc.cs" %>
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/Service1.svc.cs
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/Service1.svc.cs	(revision 2733)
+++ 	(revision )
@@ -1,22 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.ServiceModel;
-using System.Text;
-
-namespace HeuristicLab.Services {
-  // NOTE: If you change the class name "Service1" here, you must also update the reference to "Service1" in Web.config and in the associated .svc file.
-  public class Service1 : IService1 {
-    public string GetData(int value) {
-      return string.Format("You entered: {0}", value);
-    }
-
-    public CompositeType GetDataUsingDataContract(CompositeType composite) {
-      if (composite.BoolValue) {
-        composite.StringValue += "Suffix";
-      }
-      return composite;
-    }
-  }
-}
Index: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/Web.config
===================================================================
--- branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/Web.config	(revision 2733)
+++ branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services/Web.config	(revision 2742)
@@ -1,3 +1,3 @@
-﻿<?xml version="1.0"?>
+<?xml version="1.0"?>
 <!--
     Note: As an alternative to hand editing this file you can use the 
@@ -93,33 +93,4 @@
     </system.codedom>
 
-    <system.web.extensions>
-      <scripting>
-        <webServices>
-          <!--
-              Uncomment this section to enable the authentication service. Include 
-              requireSSL="true" if appropriate.
-
-          <authenticationService enabled="true" requireSSL = "true|false"/>
-          -->
-          <!--
-              Uncomment these lines to enable the profile service, and to choose the 
-              profile properties that can be retrieved and modified in ASP.NET AJAX 
-              applications.
-
-          <profileService enabled="true"
-                          readAccessProperties="propertyname1,propertyname2"
-                          writeAccessProperties="propertyname1,propertyname2" />
-          -->
-          <!--
-              Uncomment this section to enable the role service.
-
-          <roleService enabled="true"/>
-          -->
-        </webServices>
-        <!--
-        <scriptResourceHandler enableCompression="true" enableCaching="true" />
-        -->
-      </scripting>
-    </system.web.extensions>
     <!--
         The system.webServer section is required for running ASP.NET AJAX under Internet
@@ -144,17 +115,30 @@
   <system.serviceModel>
     <services>
-      <service name="HeuristicLab.Services.Service1" behaviorConfiguration="HeuristicLab.Services.Service1Behavior">
-        <!-- Service Endpoints -->
+      <service behaviorConfiguration="HeuristicLab.Services.Service1Behavior"
+        name="HeuristicLab.Services.Service1">
         <endpoint address="" binding="wsHttpBinding" contract="HeuristicLab.Services.IService1">
-          <!-- 
-              Upon deployment, the following identity element should be removed or replaced to reflect the 
-              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
-              automatically.
-          -->
           <identity>
-            <dns value="localhost"/>
+            <dns value="localhost" />
           </identity>
         </endpoint>
-        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
+        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
+      </service>
+      <service behaviorConfiguration="HeuristicLab.Services.UpdateBehavior"
+        name="HeuristicLab.Services.Update">
+        <endpoint address="" binding="wsHttpBinding" contract="HeuristicLab.Services.IUpdate">
+          <identity>
+            <dns value="localhost" />
+          </identity>
+        </endpoint>
+        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
+      </service>
+      <service behaviorConfiguration="HeuristicLab.Services.AdminBehavior"
+        name="HeuristicLab.Services.Admin">
+        <endpoint address="" binding="wsHttpBinding" contract="HeuristicLab.Services.IAdmin">
+          <identity>
+            <dns value="localhost" />
+          </identity>
+        </endpoint>
+        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
       </service>
     </services>
@@ -162,8 +146,14 @@
       <serviceBehaviors>
         <behavior name="HeuristicLab.Services.Service1Behavior">
-          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
-          <serviceMetadata httpGetEnabled="true"/>
-          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
-          <serviceDebug includeExceptionDetailInFaults="false"/>
+          <serviceMetadata httpGetEnabled="true" />
+          <serviceDebug includeExceptionDetailInFaults="false" />
+        </behavior>
+        <behavior name="HeuristicLab.Services.UpdateBehavior">
+          <serviceMetadata httpGetEnabled="true" />
+          <serviceDebug includeExceptionDetailInFaults="false" />
+        </behavior>
+        <behavior name="HeuristicLab.Services.AdminBehavior">
+          <serviceMetadata httpGetEnabled="true" />
+          <serviceDebug includeExceptionDetailInFaults="false" />
         </behavior>
       </serviceBehaviors>
