Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloModel.Designer.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloModel.Designer.cs	(revision 6794)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloModel.Designer.cs	(revision 6794)
@@ -0,0 +1,212 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//    This code was generated from a template.
+//
+//    Manual changes to this file may cause unexpected behavior in your application.
+//    Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Data.Objects;
+using System.Data.Objects.DataClasses;
+using System.Data.EntityClient;
+using System.ComponentModel;
+using System.Xml.Serialization;
+using System.Runtime.Serialization;
+
+[assembly: EdmSchemaAttribute()]
+
+namespace HeuristicLab.Services.Hello
+{
+    #region Contexts
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    public partial class HelloEntities : ObjectContext
+    {
+        #region Constructors
+    
+        /// <summary>
+        /// Initializes a new HelloEntities object using the connection string found in the 'HelloEntities' section of the application configuration file.
+        /// </summary>
+        public HelloEntities() : base("name=HelloEntities", "HelloEntities")
+        {
+            this.ContextOptions.LazyLoadingEnabled = true;
+            OnContextCreated();
+        }
+    
+        /// <summary>
+        /// Initialize a new HelloEntities object.
+        /// </summary>
+        public HelloEntities(string connectionString) : base(connectionString, "HelloEntities")
+        {
+            this.ContextOptions.LazyLoadingEnabled = true;
+            OnContextCreated();
+        }
+    
+        /// <summary>
+        /// Initialize a new HelloEntities object.
+        /// </summary>
+        public HelloEntities(EntityConnection connection) : base(connection, "HelloEntities")
+        {
+            this.ContextOptions.LazyLoadingEnabled = true;
+            OnContextCreated();
+        }
+    
+        #endregion
+    
+        #region Partial Methods
+    
+        partial void OnContextCreated();
+    
+        #endregion
+    
+        #region ObjectSet Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        public ObjectSet<Saying> Sayings
+        {
+            get
+            {
+                if ((_Sayings == null))
+                {
+                    _Sayings = base.CreateObjectSet<Saying>("Sayings");
+                }
+                return _Sayings;
+            }
+        }
+        private ObjectSet<Saying> _Sayings;
+
+        #endregion
+        #region AddTo Methods
+    
+        /// <summary>
+        /// Deprecated Method for adding a new object to the Sayings EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
+        /// </summary>
+        public void AddToSayings(Saying saying)
+        {
+            base.AddObject("Sayings", saying);
+        }
+
+        #endregion
+    }
+    
+
+    #endregion
+    
+    #region Entities
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="HelloDatabaseModel", Name="Saying")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Saying : EntityObject
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new Saying object.
+        /// </summary>
+        /// <param name="id">Initial value of the id property.</param>
+        /// <param name="message">Initial value of the message property.</param>
+        /// <param name="date">Initial value of the date property.</param>
+        public static Saying CreateSaying(global::System.Int32 id, global::System.String message, global::System.DateTime date)
+        {
+            Saying saying = new Saying();
+            saying.id = id;
+            saying.message = message;
+            saying.date = date;
+            return saying;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 id
+        {
+            get
+            {
+                return _id;
+            }
+            set
+            {
+                if (_id != value)
+                {
+                    OnidChanging(value);
+                    ReportPropertyChanging("id");
+                    _id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("id");
+                    OnidChanged();
+                }
+            }
+        }
+        private global::System.Int32 _id;
+        partial void OnidChanging(global::System.Int32 value);
+        partial void OnidChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String message
+        {
+            get
+            {
+                return _message;
+            }
+            set
+            {
+                OnmessageChanging(value);
+                ReportPropertyChanging("message");
+                _message = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("message");
+                OnmessageChanged();
+            }
+        }
+        private global::System.String _message;
+        partial void OnmessageChanging(global::System.String value);
+        partial void OnmessageChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.DateTime date
+        {
+            get
+            {
+                return _date;
+            }
+            set
+            {
+                OndateChanging(value);
+                ReportPropertyChanging("date");
+                _date = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("date");
+                OndateChanged();
+            }
+        }
+        private global::System.DateTime _date;
+        partial void OndateChanging(global::System.DateTime value);
+        partial void OndateChanged();
+
+        #endregion
+    
+    }
+
+    #endregion
+    
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloModel.edmx
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloModel.edmx	(revision 6794)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloModel.edmx	(revision 6794)
@@ -0,0 +1,71 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
+  <!-- EF Runtime content -->
+  <edmx:Runtime>
+    <!-- SSDL content -->
+    <edmx:StorageModels>
+      <Schema Namespace="HelloDatabaseModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
+        <EntityContainer Name="HelloDatabaseModelStoreContainer">
+          <EntitySet Name="Saying" EntityType="HelloDatabaseModel.Store.Saying" store:Type="Tables" Schema="dbo" />
+        </EntityContainer>
+        <EntityType Name="Saying">
+          <Key>
+            <PropertyRef Name="id" />
+          </Key>
+          <Property Name="id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
+          <Property Name="message" Type="nvarchar" Nullable="false" MaxLength="256" />
+          <Property Name="date" Type="datetime" Nullable="false" />
+        </EntityType>
+      </Schema>
+    </edmx:StorageModels>
+    <!-- CSDL content -->
+    <edmx:ConceptualModels>
+      <Schema Namespace="HelloDatabaseModel" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
+        <EntityContainer Name="HelloEntities" annotation:LazyLoadingEnabled="true">
+          <EntitySet Name="Sayings" EntityType="HelloDatabaseModel.Saying" />
+        </EntityContainer>
+        <EntityType Name="Saying">
+          <Key>
+            <PropertyRef Name="id" />
+          </Key>
+          <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="message" Type="String" Nullable="false" MaxLength="256" Unicode="true" FixedLength="false" />
+          <Property Name="date" Type="DateTime" Nullable="false" />
+        </EntityType>
+      </Schema>
+    </edmx:ConceptualModels>
+    <!-- C-S mapping content -->
+    <edmx:Mappings>
+      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">
+        <EntityContainerMapping StorageEntityContainer="HelloDatabaseModelStoreContainer" CdmEntityContainer="HelloEntities">
+          <EntitySetMapping Name="Sayings"><EntityTypeMapping TypeName="HelloDatabaseModel.Saying"><MappingFragment StoreEntitySet="Saying">
+            <ScalarProperty Name="id" ColumnName="id" />
+            <ScalarProperty Name="message" ColumnName="message" />
+            <ScalarProperty Name="date" ColumnName="date" />
+          </MappingFragment></EntityTypeMapping></EntitySetMapping>
+        </EntityContainerMapping>
+      </Mapping>
+    </edmx:Mappings>
+  </edmx:Runtime>
+  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
+    <Connection>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
+      </DesignerInfoPropertySet>
+    </Connection>
+    <Options>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="ValidateOnBuild" Value="true" />
+        <DesignerProperty Name="EnablePluralization" Value="False" />
+        <DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
+      </DesignerInfoPropertySet>
+    </Options>
+    <!-- Diagram content (shape and connector positions) -->
+    <Diagrams>
+      <Diagram Name="HelloModel">
+        <EntityTypeShape EntityType="HelloDatabaseModel.Saying" Width="1.5" PointX="0.75" PointY="0.75" Height="1.59568359375" IsExpanded="true" />
+      </Diagram>
+    </Diagrams>
+  </Designer>
+</edmx:Edmx>
Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloService.svc.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloService.svc.cs	(revision 6793)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloService.svc.cs	(revision 6794)
@@ -20,4 +20,6 @@
 #endregion
 
+
+using System;
 namespace HeuristicLab.Services.Hello {
   public class HelloService : IHelloService {
@@ -25,4 +27,15 @@
       return "Hello";
     }
+
+    public string Say(string phrase) {
+      using (HelloEntities context = new HelloEntities()) {
+        Saying s = context.Sayings.CreateObject();
+        s.message = phrase.Length > 256 ? phrase.Substring(0, 256) : phrase;
+        s.date = DateTime.Now;
+        context.Sayings.AddObject(s);
+        context.SaveChanges();
+      }
+      return phrase;
+    }
   }
 }
Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HeuristicLab.Services.Hello-3.3.csproj
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HeuristicLab.Services.Hello-3.3.csproj	(revision 6793)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HeuristicLab.Services.Hello-3.3.csproj	(revision 6794)
@@ -31,7 +31,23 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <PublishDatabaseSettings>
+      <Objects>
+        <ObjectGroup Name="HelloEntities-Deployment" Order="1" Enabled="True">
+          <Destination Path="Data Source=SERVICES%3bInitial Catalog=HelloDatabase%3bIntegrated Security=True" />
+          <Object Type="dbFullSql" Enabled="False">
+            <PreSource Path="Data Source=LOCALHOST\SQLEXPRESS%3bInitial Catalog=HelloDatabase%3bIntegrated Security=True" ScriptSchema="True" ScriptData="False" CopyAllFullTextCatalogs="False" />
+            <Source Path="obj\Release\AutoScripts\HelloEntities-Deployment_SchemaOnly.sql" Transacted="True" />
+          </Object>
+          <Object Type="dbFullSql" xmlns="" Enabled="False">
+            <Source Path="SQLScripts\CreateDatabase.sql" Transacted="False" />
+          </Object>
+        </ObjectGroup>
+      </Objects>
+    </PublishDatabaseSettings>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data.Entity" />
+    <Reference Include="System.Security" />
     <Reference Include="System.Web.DynamicData" />
     <Reference Include="System.Web.Entity" />
@@ -54,4 +70,5 @@
   <ItemGroup>
     <Content Include="HelloService.svc" />
+    <Content Include="SQLScripts\CreateDatabase.sql" />
     <Content Include="Web.config" />
     <Content Include="Web.Debug.config">
@@ -63,4 +80,9 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="HelloModel.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>HelloModel.edmx</DependentUpon>
+    </Compile>
     <Compile Include="HelloService.svc.cs">
       <DependentUpon>HelloService.svc</DependentUpon>
@@ -71,4 +93,10 @@
   <ItemGroup>
     <Folder Include="App_Data\" />
+  </ItemGroup>
+  <ItemGroup>
+    <EntityDeploy Include="HelloModel.edmx">
+      <Generator>EntityModelCodeGenerator</Generator>
+      <LastGenOutput>HelloModel.Designer.cs</LastGenOutput>
+    </EntityDeploy>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/IHelloService.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/IHelloService.cs	(revision 6793)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/IHelloService.cs	(revision 6794)
@@ -21,4 +21,5 @@
 
 using System.ServiceModel;
+using System.ServiceModel.Web;
 
 namespace HeuristicLab.Services.Hello {
@@ -26,5 +27,10 @@
   public interface IHelloService {
     [OperationContract]
+    [WebGet(UriTemplate = "SayHello")]
     string SayHello();
+
+    [OperationContract]
+    [WebGet(UriTemplate = "Say/{phrase}")]
+    string Say(string phrase);
   }
 }
Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/SQLScripts/CreateDatabase.sql
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/SQLScripts/CreateDatabase.sql	(revision 6794)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/SQLScripts/CreateDatabase.sql	(revision 6794)
@@ -0,0 +1,8 @@
+﻿USE [HelloDatabase];
+GO
+CREATE USER heuristiclab FOR LOGIN [SERVICES\heuristiclab];
+GO
+EXEC sp_addrolemember db_datareader, heuristiclab;
+GO
+EXEC sp_addrolemember db_datawriter, heuristiclab;
+GO
Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/Web.Release.config
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/Web.Release.config	(revision 6793)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/Web.Release.config	(revision 6794)
@@ -8,4 +8,7 @@
     <compilation xdt:Transform="RemoveAttributes(debug)" />
   </system.web>
+  <connectionStrings>
+    <add xdt:Transform="Replace" name="HelloEntities" connectionString="metadata=res://*/HelloModel.csdl|res://*/HelloModel.ssdl|res://*/HelloModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=SERVICES;Initial Catalog=HelloDatabase;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
 
 </configuration>
Index: /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/Web.config
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/Web.config	(revision 6793)
+++ /branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/Web.config	(revision 6794)
@@ -3,22 +3,61 @@
 
   <system.web>
-    <compilation debug="true" targetFramework="4.0" />
+    <compilation debug="true" targetFramework="4.0">
+      <assemblies>
+        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+      </assemblies>
+    </compilation>
   </system.web>
+  
   <system.serviceModel>
+    <bindings>
+      <webHttpBinding> <!-- separate bindings are necessary -->
+        <binding name="jsonBinding" />
+        <binding name="xmlBinding" />
+      </webHttpBinding>
+    </bindings>
+    
     <behaviors>
       <serviceBehaviors>
         <behavior>
-          <!-- 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="true" />
         </behavior>
       </serviceBehaviors>
+      
+      <endpointBehaviors>
+        <behavior name="xmlEndpoint">
+          <webHttp helpEnabled="true" defaultOutgoingResponseFormat="Xml" />
+        </behavior>
+        <behavior name="jsonEndpoint"> <!-- do not specify enableWebScript or UriTemplate will not work -->
+          <webHttp helpEnabled="true" defaultOutgoingResponseFormat="Json" />
+        </behavior>
+      </endpointBehaviors>
     </behaviors>
+    
+    <services>
+      <service name="HeuristicLab.Services.Hello.HelloService"> <!-- name needs to match the service entry in the .svc markup file -->
+        <!-- URL: HelloService.svc -->
+        <!-- URL: HelloService.svc?wsdl -->
+        <endpoint name="soap" address="" binding="basicHttpBinding" contract="HeuristicLab.Services.Hello.IHelloService" />
+        <endpoint name="mex" address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
+        <!-- URL: HelloService.svc/json/... -->
+        <!-- URL: HelloService.svc/json/help -->
+        <endpoint name="restJson" address="json" binding="webHttpBinding" bindingConfiguration="jsonBinding" contract="HeuristicLab.Services.Hello.IHelloService" behaviorConfiguration="jsonEndpoint" />
+        <!-- URL: HelloService.svc/xml/... -->
+        <!-- URL: HelloService.svc/xml/help -->
+        <endpoint name="restXml" address="xml" binding="webHttpBinding" bindingConfiguration="xmlBinding" contract="HeuristicLab.Services.Hello.IHelloService" behaviorConfiguration="xmlEndpoint" />
+      </service>
+    </services>
+    
     <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
   </system.serviceModel>
- <system.webServer>
-    <modules runAllManagedModulesForAllRequests="true"/>
+  
+  <system.webServer>
+    <modules runAllManagedModulesForAllRequests="true" />
   </system.webServer>
   
+  <connectionStrings>
+    <add name="HelloEntities" connectionString="metadata=res://*/HelloModel.csdl|res://*/HelloModel.ssdl|res://*/HelloModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=LOCALHOST\SQLEXPRESS;Initial Catalog=HelloDatabase;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
 </configuration>
