Commits

Steve Michelotti committed 06bd96c

checkin of Begin & Final

  • Participants
  • Parent commits c7016cf

Comments (0)

Files changed (653)

File docs/KnockoutJS-Outline.docx

Binary file modified.

File docs/KnockoutJS.pptx

Binary file modified.

File snippets/Knockout-HtmlSnippets/ko9-drillsMarkup.snippet

+<?xml version="1.0" encoding="utf-8"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+  <CodeSnippet Format="1.0.0">
+    <Header>
+      <SnippetTypes>
+        <SnippetType>Expansion</SnippetType>
+      </SnippetTypes>
+      <Title>ko9-drillsMarkup</Title>
+      <Author>Steve Michelotti</Author>
+      <Description>
+      </Description>
+      <HelpUrl>
+      </HelpUrl>
+      <Shortcut>ko9drillsMarkup</Shortcut>
+    </Header>
+    <Snippet>
+      <Code Language="html"><![CDATA[<div id="drillsList" class="box">
+    <div class="box-head">
+        <h2 class="left"><span data-bind="text: selectedTag().Name() + ' Drills'"></span></h2>
+    </div>
+
+    <div class="box-content">
+        <input id="newDrill" type="text" placeholder="Add New Drill" data-bind="value: drillToAdd, valueUpdate: 'afterkeydown', executeOnEnter: addDrill" />
+        <button data-bind="click: addDrill, enable: drillToAdd().length > 0">+ Add</button>
+
+        <ul data-bind="foreach: currentTagDrills">
+            
+            <li data-bind="click: $$parent.drillClick, css: {activeDrill: $$parent.clickedDrill() === $$data }, event: { mouseover: $$parent.drillMouseOver, mouseout: $$parent.drillMouseOut }">
+                <span data-bind="text: Name"></span>
+                <div>
+                    <a href="#" class="drill-delete">Delete</a>
+                </div>
+            </li>
+            
+        </ul>
+    </div>
+</div>
+
+<div id="drillDetail" class="box" data-bind="with: selectedDrill">
+    <div class="box-head">
+        <h2 class="left"><span data-bind="text: 'Drill: ' + Name()"></span></h2>
+
+        <div class="right">
+            <button data-bind="click: $$parent.editDrill">Edit</button>
+		</div>
+    </div>
+
+    <div class="box-content">
+            
+        <div class="editor-label">
+            <label for="drillName">Name:</label>
+        </div>
+        <div class="editor-field">
+            <!-- ko if: $$parent.useDrillEditTemplate -->
+                <input type="text" data-bind="value: Name" />
+            <!-- /ko -->
+            <!-- ko ifnot: $$parent.useDrillEditTemplate -->
+                <span data-bind="text: Name"></span>
+            <!-- /ko -->
+        </div>
+
+        <div class="editor-label">
+            <label for="drillName">Description:</label>
+        </div>
+        <div class="editor-field">
+            <!-- ko if: $$parent.useDrillEditTemplate -->
+                <input type="text" data-bind="value: Description" />
+            <!-- /ko -->
+            <!-- ko ifnot: $$parent.useDrillEditTemplate -->
+                <span data-bind="text: Description"></span>
+            <!-- /ko -->
+        </div>
+
+        <div class="editor-label">
+            <label for="drillName">Link:</label>
+        </div>
+        <div class="editor-field">
+            <!-- ko if: $$parent.useDrillEditTemplate -->
+                <input type="text" data-bind="value: Url" />
+            <!-- /ko -->
+            <!-- ko ifnot: $$parent.useDrillEditTemplate -->
+                <a data-bind="visible: Url, text: Name, attr: { href: Url }" target="_blank"></a>
+                <span data-bind="visible: !Url()">(None)</span>
+            <!-- /ko -->
+        </div>
+
+        <div class="editor-label">
+            <label for="drillName">Tag:</label>
+        </div>
+        <div class="editor-field">
+            <!-- ko if: $$parent.useDrillEditTemplate -->
+                <select data-bind="options: $$parent.tags, optionsText: 'Name', optionsValue: 'Id', value: TagId"></select>
+            <!-- /ko -->
+            <!-- ko ifnot: $$parent.useDrillEditTemplate -->
+                <span data-bind="text: $$parent.tagNameFor(TagId())"></span>
+            <!-- /ko -->
+        </div>
+           
+        <!-- ko if: $$parent.useDrillEditTemplate -->
+            <button data-bind="click: $$parent.saveDrill">Save</button>
+            <button data-bind="click: $$parent.cancelDrillEdit">Cancel</button>
+        <!-- /ko -->
+    </div>
+</div>
+]]></Code>
+    </Snippet>
+  </CodeSnippet>
+</CodeSnippets>

File snippets/Knockout-JSSnippets/ko2-indexjsinit.snippet

-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
   <CodeSnippet Format="1.0.0">
     <Header>
 /// <reference path="jquery-ui-1.8.16.js" />
 /// <reference path="jquery-1.6.4.js" />
 /// <reference path="ajax-util.js" />
+/// <reference path="ko-protected-observable.js" />
 
 $$(function () {
     var data = [

File snippets/Knockout-JSSnippets/ko6-addOnEnter.snippet

+<?xml version="1.0" encoding="utf-8"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+  <CodeSnippet Format="1.0.0">
+    <Header>
+      <SnippetTypes>
+        <SnippetType>Expansion</SnippetType>
+      </SnippetTypes>
+      <Title>ko6-addOnEnter</Title>
+      <Author>Steve Michelotti</Author>
+      <Description>
+      </Description>
+      <HelpUrl>
+      </HelpUrl>
+      <Shortcut>ko6addOnEnter</Shortcut>
+    </Header>
+    <Snippet>
+      <Code Language="jscript"><![CDATA[addOnEnter: function (event) {
+            if (event.which === 13) {
+                viewModel.addTag();
+            }
+            return true;
+        }]]></Code>
+    </Snippet>
+  </CodeSnippet>
+</CodeSnippets>

File snippets/Knockout-JSSnippets/ko7-toTagItemArray.snippet

+<?xml version="1.0" encoding="utf-8"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+  <CodeSnippet Format="1.0.0">
+    <Header>
+      <SnippetTypes>
+        <SnippetType>Expansion</SnippetType>
+      </SnippetTypes>
+      <Title>ko7-toTagItemArray</Title>
+      <Author>Steve Michelotti</Author>
+      <Description>
+      </Description>
+      <HelpUrl>
+      </HelpUrl>
+      <Shortcut>ko7toTagItemArray</Shortcut>
+    </Header>
+    <Snippet>
+      <Code Language="jscript"><![CDATA[function toTagItemArray(data) {
+        var tagItems = ko.utils.arrayMap(data, function (item) {
+            return new tagItem(item.Name, item.Id);
+        });
+        return tagItems;
+    }]]></Code>
+    </Snippet>
+  </CodeSnippet>
+</CodeSnippets>

File snippets/Knockout-JSSnippets/ko8-ajaxAdd.snippet

+<?xml version="1.0" encoding="utf-8"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+  <CodeSnippet Format="1.0.0">
+    <Header>
+      <SnippetTypes>
+        <SnippetType>Expansion</SnippetType>
+      </SnippetTypes>
+      <Title>ko8-ajaxAdd</Title>
+      <Author>Steve Michelotti</Author>
+      <Description>
+      </Description>
+      <HelpUrl>
+      </HelpUrl>
+      <Shortcut>ko8ajaxAdd</Shortcut>
+    </Header>
+    <Snippet>
+      <Code Language="jscript"><![CDATA[ajaxAdd("/tags", ko.toJSON(newTag), function (data) {
+                    viewModel.tags.push(new ko.protectedObservableItem(data));
+                });]]></Code>
+    </Snippet>
+  </CodeSnippet>
+</CodeSnippets>

File src/Begin/BasketballPlaybook/BasketballPlaybook.Tests/App.config

+<?xml version="1.0" encoding="utf-8" ?>
+<!-- 
+    Note: Add entries to the App.config file for configuration settings
+    that apply only to the Test project.
+-->
+<configuration>
+    <appSettings>
+
+    </appSettings>
+
+    <connectionStrings>
+
+    </connectionStrings>
+</configuration>

File src/Begin/BasketballPlaybook/BasketballPlaybook.Tests/BasketballPlaybook.Tests.csproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{D7D50120-1FFC-425C-AC8A-4E9482FFA0A6}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>BasketballPlaybook.Tests</RootNamespace>
+    <AssemblyName>BasketballPlaybook.Tests</AssemblyName>
+    <TargetFrameworkVersion>v4.0</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.CSharp" />
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Web" />
+    <Reference Include="System.Web.ApplicationServices" />
+    <Reference Include="System.Web.Extensions" />
+    <Reference Include="System.Web.Abstractions" />
+    <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="System.Web.Routing" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Controllers\HomeControllerTest.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\BasketballPlaybook\BasketballPlaybook.csproj">
+      <Project>{B04D61A0-0B9A-4A82-8C49-CC616A7ADE91}</Project>
+      <Name>BasketballPlaybook</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>

File src/Begin/BasketballPlaybook/BasketballPlaybook.Tests/Controllers/HomeControllerTest.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web.Mvc;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using BasketballPlaybook;
+using BasketballPlaybook.Controllers;
+
+namespace BasketballPlaybook.Tests.Controllers
+{
+    [TestClass]
+    public class HomeControllerTest
+    {
+        [TestMethod]
+        public void Index()
+        {
+            // Arrange
+            HomeController controller = new HomeController();
+
+            // Act
+            ViewResult result = controller.Index() as ViewResult;
+
+            // Assert
+            Assert.AreEqual("Welcome to ASP.NET MVC!", result.ViewBag.Message);
+        }
+
+        [TestMethod]
+        public void About()
+        {
+            // Arrange
+            HomeController controller = new HomeController();
+
+            // Act
+            ViewResult result = controller.About() as ViewResult;
+
+            // Assert
+            Assert.IsNotNull(result);
+        }
+    }
+}

File src/Begin/BasketballPlaybook/BasketballPlaybook.Tests/Properties/AssemblyInfo.cs

+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("BasketballPlaybook.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("BasketballPlaybook.Tests")]
+[assembly: AssemblyCopyright("Copyright ©  2011")]
+[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("1952f265-da1c-43a1-bb3a-867206eb2654")]
+
+// 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")]

File src/Begin/BasketballPlaybook/BasketballPlaybook.sln

+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasketballPlaybook", "BasketballPlaybook\BasketballPlaybook.csproj", "{B04D61A0-0B9A-4A82-8C49-CC616A7ADE91}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasketballPlaybook.Tests", "BasketballPlaybook.Tests\BasketballPlaybook.Tests.csproj", "{D7D50120-1FFC-425C-AC8A-4E9482FFA0A6}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{B04D61A0-0B9A-4A82-8C49-CC616A7ADE91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B04D61A0-0B9A-4A82-8C49-CC616A7ADE91}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B04D61A0-0B9A-4A82-8C49-CC616A7ADE91}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B04D61A0-0B9A-4A82-8C49-CC616A7ADE91}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D7D50120-1FFC-425C-AC8A-4E9482FFA0A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D7D50120-1FFC-425C-AC8A-4E9482FFA0A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D7D50120-1FFC-425C-AC8A-4E9482FFA0A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D7D50120-1FFC-425C-AC8A-4E9482FFA0A6}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

File src/Begin/BasketballPlaybook/BasketballPlaybook.sln.docstates.suo

Binary file added.

File src/Begin/BasketballPlaybook/BasketballPlaybook.suo

Binary file added.

File src/Begin/BasketballPlaybook/BasketballPlaybook/Api/DrillsApi.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.ServiceModel;
+using System.ServiceModel.Web;
+using Microsoft.ApplicationServer.Http;
+using Microsoft.ApplicationServer.Http.Dispatcher;
+using BasketballPlaybook.Models;
+
+namespace BasketballPlaybook
+{ 
+	[ServiceContract]
+    public class DrillsApi
+    {
+		private readonly IDrillRepository drillRepository;
+
+		public DrillsApi (IDrillRepository drillRepository) 
+		{
+			this.drillRepository = drillRepository;
+		}
+
+        [WebGet(UriTemplate = "?tagId={tagId}")]
+        public HttpResponseMessage<List<Drill>> GetByTag(int tagId)
+        {
+            var list = this.drillRepository.All.Where(d => d.TagId == tagId).ToList();
+            var response = new HttpResponseMessage<List<Drill>>(list);
+            return response;
+        }
+
+        [WebGet(UriTemplate = "{id}")]
+        public HttpResponseMessage<Drill> Get(int id)
+        {
+			var item = this.drillRepository.Find(id);
+			if (item == null)
+			{
+                var notFoundResponse = new HttpResponseMessage();
+                notFoundResponse.StatusCode = HttpStatusCode.NotFound;
+                notFoundResponse.Content = new StringContent("Item not found");
+                throw new HttpResponseException(notFoundResponse);
+            }
+            var response = new HttpResponseMessage<Drill>(item);
+
+            // set it to expire in 5 minutes
+            response.Content.Headers.Expires = new DateTimeOffset(DateTime.Now.AddSeconds(30));
+            return response;
+        }
+
+        [WebInvoke(UriTemplate = "", Method = "POST")]
+        public HttpResponseMessage<Drill> Post(Drill item)
+        {
+			this.drillRepository.InsertOrUpdate(item);
+            this.drillRepository.Save();
+
+            var response = new HttpResponseMessage<Drill>(item);
+            response.StatusCode = HttpStatusCode.Created;
+            response.Headers.Location = new Uri("drills/" + item.Id, UriKind.Relative);
+            return response;
+        }
+
+        [WebInvoke(UriTemplate = "{id}", Method = "PUT")]
+        public Drill Put(int id, Drill item)
+        {
+			this.drillRepository.InsertOrUpdate(item);
+            this.drillRepository.Save();
+            return item;
+        }
+
+        [WebInvoke(UriTemplate = "{id}", Method = "DELETE")]
+        public HttpResponseMessage Delete(int id)
+        {
+			this.drillRepository.Delete(id);
+            this.drillRepository.Save();
+            return new HttpResponseMessage(HttpStatusCode.NoContent);
+        }
+ 
+	}
+}
+

File src/Begin/BasketballPlaybook/BasketballPlaybook/Api/TagsApi.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.ServiceModel;
+using System.ServiceModel.Web;
+using Microsoft.ApplicationServer.Http;
+using Microsoft.ApplicationServer.Http.Dispatcher;
+using BasketballPlaybook.Models;
+//using BasketballPlaybook.Resources;
+
+namespace BasketballPlaybook
+{ 
+	[ServiceContract]
+    public class TagsApi
+    {
+		private readonly ITagRepository tagRepository;
+
+
+		public TagsApi (ITagRepository tagRepository) 
+		{
+			this.tagRepository = tagRepository;
+		}
+
+        [WebGet]
+        public HttpResponseMessage<List<Tag>> GetAll()
+        {
+            var list = this.tagRepository.All.ToList();
+            var response = new HttpResponseMessage<List<Tag>>(list);
+            return response;
+        }
+
+        [WebGet(UriTemplate = "{id}")]
+        public HttpResponseMessage<Tag> Get(int id)
+        {
+			var item = this.tagRepository.Find(id);
+			if (item == null)
+			{
+                var notFoundResponse = new HttpResponseMessage();
+                notFoundResponse.StatusCode = HttpStatusCode.NotFound;
+                notFoundResponse.Content = new StringContent("Item not found");
+                throw new HttpResponseException(notFoundResponse);
+            }
+            var response = new HttpResponseMessage<Tag>(item);
+
+            // set it to expire in 5 minutes
+            response.Content.Headers.Expires = new DateTimeOffset(DateTime.Now.AddSeconds(30));
+            return response;
+        }
+
+        [WebInvoke(UriTemplate = "", Method = "POST")]
+        public HttpResponseMessage<Tag> Post(Tag item)
+        {
+			this.tagRepository.InsertOrUpdate(item);
+            this.tagRepository.Save();
+
+            var response = new HttpResponseMessage<Tag>(item);
+            response.StatusCode = HttpStatusCode.Created;
+            response.Headers.Location = new Uri("tags/" + item.Id, UriKind.Relative);
+            return response;
+        }
+
+        [WebInvoke(UriTemplate = "{id}", Method = "PUT")]
+        public Tag Put(int id, Tag item)
+        {
+			this.tagRepository.InsertOrUpdate(item);
+            this.tagRepository.Save();
+            return item;
+        }
+
+        [WebInvoke(UriTemplate = "{id}", Method = "DELETE")]
+        public HttpResponseMessage Delete(int id)
+        {
+			this.tagRepository.Delete(id);
+            this.tagRepository.Save();
+            return new HttpResponseMessage(HttpStatusCode.NoContent);
+        }
+ 
+	}
+}
+

File src/Begin/BasketballPlaybook/BasketballPlaybook/App_Data/BasketballPlaybook.Models.PlaybookDbContext.sdf

Binary file added.

File src/Begin/BasketballPlaybook/BasketballPlaybook/App_Start/DrillsApiStart.cs

+using System;
+using System.Web.Routing;
+using Microsoft.ApplicationServer.Http;
+using Microsoft.ApplicationServer.Http.Activation;
+using Microsoft.ApplicationServer.Http.Description;
+using BasketballPlaybook.DependencyResolution;
+
+[assembly: WebActivator.PreApplicationStartMethod(typeof(BasketballPlaybook.App_Start.DrillsApiStart), "Start")]
+
+namespace BasketballPlaybook.App_Start {
+    public static class DrillsApiStart {
+        public static void Start() {
+			var iocContainer = IoC.Initialize();
+            var config = new WebApiConfiguration();
+            config.CreateInstance = (type, instance, message) => { return iocContainer.GetInstance(type); };
+            config.EnableTestClient = true;
+            RouteTable.Routes.SetDefaultHttpConfiguration(config);
+            RouteTable.Routes.MapServiceRoute<DrillsApi>("drills");
+        }
+    }
+}

File src/Begin/BasketballPlaybook/BasketballPlaybook/App_Start/EntityFramework.SqlServerCompact.cs

+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+
+[assembly: WebActivator.PreApplicationStartMethod(typeof(BasketballPlaybook.App_Start.EntityFramework_SqlServerCompact), "Start")]
+
+namespace BasketballPlaybook.App_Start {
+    public static class EntityFramework_SqlServerCompact {
+        public static void Start() {
+            Database.DefaultConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0");
+        }
+    }
+}

File src/Begin/BasketballPlaybook/BasketballPlaybook/App_Start/TagsApiStart.cs

+using System;
+using System.Web.Routing;
+using Microsoft.ApplicationServer.Http;
+using Microsoft.ApplicationServer.Http.Activation;
+using Microsoft.ApplicationServer.Http.Description;
+using BasketballPlaybook.DependencyResolution;
+
+[assembly: WebActivator.PreApplicationStartMethod(typeof(BasketballPlaybook.App_Start.TagsApiStart), "Start")]
+
+namespace BasketballPlaybook.App_Start {
+    public static class TagsApiStart {
+        public static void Start() {
+			var iocContainer = IoC.Initialize();
+            var config = new WebApiConfiguration();
+            config.CreateInstance = (type, instance, message) => { return iocContainer.GetInstance(type); };
+            config.EnableTestClient = true;
+            RouteTable.Routes.SetDefaultHttpConfiguration(config);
+            RouteTable.Routes.MapServiceRoute<TagsApi>("tags");
+        }
+    }
+}

File src/Begin/BasketballPlaybook/BasketballPlaybook/BasketballPlaybook.csproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{B04D61A0-0B9A-4A82-8C49-CC616A7ADE91}</ProjectGuid>
+    <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>BasketballPlaybook</RootNamespace>
+    <AssemblyName>BasketballPlaybook</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <MvcBuildViews>false</MvcBuildViews>
+    <UseIISExpress>false</UseIISExpress>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\</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\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="EntityFramework">
+      <HintPath>..\packages\EntityFramework.4.1.10715.0\lib\EntityFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.ApplicationServer.Http">
+      <HintPath>..\packages\WebApi.0.5.0\lib\40-Full\Microsoft.ApplicationServer.Http.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.ApplicationServer.HttpEnhancements">
+      <HintPath>..\packages\WebApi.Enhancements.0.5.0\lib\40-Full\Microsoft.ApplicationServer.HttpEnhancements.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="Microsoft.Json">
+      <HintPath>..\packages\JsonValue.0.5.0\lib\40\Microsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Net.Http">
+      <HintPath>..\packages\HttpClient.0.5.0\lib\40\Microsoft.Net.Http.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Net.Http.Formatting">
+      <HintPath>..\packages\HttpClient.0.5.0\lib\40\Microsoft.Net.Http.Formatting.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Runtime.Serialization.Internal">
+      <HintPath>..\packages\WebApi.0.5.0\lib\40-Full\Microsoft.Runtime.Serialization.Internal.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Server.Common">
+      <HintPath>..\packages\WebApi.0.5.0\lib\40-Full\Microsoft.Server.Common.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.ServiceModel.Internal">
+      <HintPath>..\packages\WebApi.0.5.0\lib\40-Full\Microsoft.ServiceModel.Internal.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <Private>True</Private>
+      <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
+    </Reference>
+    <Reference Include="StructureMap">
+      <HintPath>..\packages\structuremap.2.6.3\lib\StructureMap.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Data.Entity" />
+    <Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
+      <Private>True</Private>
+      <HintPath>..\packages\SqlServerCompact.4.0.8482.1\lib\System.Data.SqlServerCe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
+      <Private>True</Private>
+      <HintPath>..\packages\EntityFramework.SqlServerCompact.4.1.8482.2\lib\System.Data.SqlServerCe.Entity.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.ServiceModel.Activation" />
+    <Reference Include="System.ServiceModel.Web" />
+    <Reference Include="System.Transactions" />
+    <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Web.DynamicData" />
+    <Reference Include="System.Web.Entity" />
+    <Reference Include="System.Web.ApplicationServices" />
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Web" />
+    <Reference Include="System.Web.Extensions" />
+    <Reference Include="System.Web.Abstractions" />
+    <Reference Include="System.Web.Routing" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Web.Services" />
+    <Reference Include="System.EnterpriseServices" />
+    <Reference Include="WebActivator">
+      <HintPath>..\packages\WebActivator.1.5\lib\net40\WebActivator.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Api\DrillsApi.cs" />
+    <Compile Include="Api\TagsApi.cs" />
+    <Compile Include="App_Start\DrillsApiStart.cs" />
+    <Compile Include="App_Start\EntityFramework.SqlServerCompact.cs" />
+    <Compile Include="App_Start\TagsApiStart.cs" />
+    <Compile Include="Controllers\AccountController.cs" />
+    <Compile Include="Controllers\HomeController.cs" />
+    <Compile Include="DependencyResolution\IoC.cs" />
+    <Compile Include="Global.asax.cs">
+      <DependentUpon>Global.asax</DependentUpon>
+    </Compile>
+    <Compile Include="Models\AccountModels.cs" />
+    <Compile Include="Models\Drill.cs" />
+    <Compile Include="Models\DrillRepository.cs" />
+    <Compile Include="Models\PlaybookDbContext.cs" />
+    <Compile Include="Models\PlaybookDbInitializer.cs" />
+    <Compile Include="Models\Tag.cs" />
+    <Compile Include="Models\TagRepository.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="App_Data\BasketballPlaybook.Models.PlaybookDbContext.sdf" />
+    <Content Include="Content\images\button.gif" />
+    <Content Include="Content\images\del.gif" />
+    <Content Include="Content\images\edit.gif" />
+    <Content Include="Content\images\footer.gif" />
+    <Content Include="Content\images\header.gif" />
+    <Content Include="Content\images\tab.gif" />
+    <Content Include="Content\jquery.notifyBar.css" />
+    <Content Include="Content\Site.css">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True