Skip to content

Commit 7b68bdb

Browse files
committed
Merge pull request #50 from csantero/todo-sample
add todo sample project
2 parents 5bd6d44 + 8ef16fa commit 7b68bdb

15 files changed

+694
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using JSONAPI.EntityFramework.Http;
2+
using JSONAPI.TodoMVC.API.Models;
3+
4+
namespace JSONAPI.TodoMVC.API.Controllers
5+
{
6+
public class TodosController : ApiController<Todo, TodoMvcContext>
7+
{
8+
}
9+
}
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProductVersion>
8+
</ProductVersion>
9+
<SchemaVersion>2.0</SchemaVersion>
10+
<ProjectGuid>{ECFA3EC5-47B8-4060-925E-9205146D6562}</ProjectGuid>
11+
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
12+
<OutputType>Library</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<RootNamespace>JSONAPI.TodoMVC.API</RootNamespace>
15+
<AssemblyName>JSONAPI.TodoMVC.API</AssemblyName>
16+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
17+
<UseIISExpress>true</UseIISExpress>
18+
<IISExpressSSLPort />
19+
<IISExpressAnonymousAuthentication />
20+
<IISExpressWindowsAuthentication />
21+
<IISExpressUseClassicPipelineMode />
22+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
23+
<RestorePackages>true</RestorePackages>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
26+
<DebugSymbols>true</DebugSymbols>
27+
<DebugType>full</DebugType>
28+
<Optimize>false</Optimize>
29+
<OutputPath>bin\</OutputPath>
30+
<DefineConstants>DEBUG;TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
35+
<DebugType>pdbonly</DebugType>
36+
<Optimize>true</Optimize>
37+
<OutputPath>bin\</OutputPath>
38+
<DefineConstants>TRACE</DefineConstants>
39+
<ErrorReport>prompt</ErrorReport>
40+
<WarningLevel>4</WarningLevel>
41+
</PropertyGroup>
42+
<ItemGroup>
43+
<Reference Include="EntityFramework">
44+
<HintPath>..\..\packages\EntityFramework.6.1.2\lib\net45\EntityFramework.dll</HintPath>
45+
</Reference>
46+
<Reference Include="EntityFramework.SqlServer">
47+
<HintPath>..\..\packages\EntityFramework.6.1.2\lib\net45\EntityFramework.SqlServer.dll</HintPath>
48+
</Reference>
49+
<Reference Include="Microsoft.CSharp" />
50+
<Reference Include="Microsoft.Owin">
51+
<HintPath>..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll</HintPath>
52+
</Reference>
53+
<Reference Include="Microsoft.Owin.Host.SystemWeb">
54+
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
55+
</Reference>
56+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
57+
<SpecificVersion>False</SpecificVersion>
58+
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
59+
</Reference>
60+
<Reference Include="Owin">
61+
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
62+
</Reference>
63+
<Reference Include="System.Net.Http" />
64+
<Reference Include="System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
65+
<SpecificVersion>False</SpecificVersion>
66+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll</HintPath>
67+
</Reference>
68+
<Reference Include="System.Web.DynamicData" />
69+
<Reference Include="System.Web.Entity" />
70+
<Reference Include="System.Web.ApplicationServices" />
71+
<Reference Include="System.ComponentModel.DataAnnotations" />
72+
<Reference Include="System" />
73+
<Reference Include="System.Data" />
74+
<Reference Include="System.Core" />
75+
<Reference Include="System.Data.DataSetExtensions" />
76+
<Reference Include="System.Web.Extensions" />
77+
<Reference Include="System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
78+
<SpecificVersion>False</SpecificVersion>
79+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll</HintPath>
80+
</Reference>
81+
<Reference Include="System.Web.Http.Owin, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
82+
<SpecificVersion>False</SpecificVersion>
83+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.2\lib\net45\System.Web.Http.Owin.dll</HintPath>
84+
</Reference>
85+
<Reference Include="System.Xml.Linq" />
86+
<Reference Include="System.Drawing" />
87+
<Reference Include="System.Web" />
88+
<Reference Include="System.Xml" />
89+
<Reference Include="System.Configuration" />
90+
<Reference Include="System.Web.Services" />
91+
<Reference Include="System.EnterpriseServices" />
92+
</ItemGroup>
93+
<ItemGroup>
94+
<Content Include="Web.config" />
95+
</ItemGroup>
96+
<ItemGroup>
97+
<Compile Include="Controllers\TodosController.cs" />
98+
<Compile Include="Migrations\201502061744049_Initial.cs" />
99+
<Compile Include="Migrations\201502061744049_Initial.Designer.cs">
100+
<DependentUpon>201502061744049_Initial.cs</DependentUpon>
101+
</Compile>
102+
<Compile Include="Migrations\Configuration.cs" />
103+
<Compile Include="Models\Todo.cs" />
104+
<Compile Include="Models\TodoMvcContext.cs" />
105+
<Compile Include="Properties\AssemblyInfo.cs" />
106+
<Compile Include="Startup.cs" />
107+
</ItemGroup>
108+
<ItemGroup>
109+
<Content Include="packages.config" />
110+
<None Include="Web.Debug.config">
111+
<DependentUpon>Web.config</DependentUpon>
112+
</None>
113+
<None Include="Web.Release.config">
114+
<DependentUpon>Web.config</DependentUpon>
115+
</None>
116+
</ItemGroup>
117+
<ItemGroup>
118+
<Folder Include="App_Data\" />
119+
</ItemGroup>
120+
<ItemGroup>
121+
<ProjectReference Include="..\JSONAPI.EntityFramework\JSONAPI.EntityFramework.csproj">
122+
<Project>{E906356C-93F6-41F6-9A0D-73B8A99AA53C}</Project>
123+
<Name>JSONAPI.EntityFramework</Name>
124+
</ProjectReference>
125+
<ProjectReference Include="..\JSONAPI\JSONAPI.csproj">
126+
<Project>{52B19FD6-EFAA-45B5-9C3E-A652E27608D1}</Project>
127+
<Name>JSONAPI</Name>
128+
</ProjectReference>
129+
</ItemGroup>
130+
<ItemGroup>
131+
<EmbeddedResource Include="Migrations\201502061744049_Initial.resx">
132+
<DependentUpon>201502061744049_Initial.cs</DependentUpon>
133+
</EmbeddedResource>
134+
</ItemGroup>
135+
<PropertyGroup>
136+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
137+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
138+
</PropertyGroup>
139+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
140+
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
141+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
142+
<ProjectExtensions>
143+
<VisualStudio>
144+
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
145+
<WebProjectProperties>
146+
<UseIIS>True</UseIIS>
147+
<AutoAssignPort>True</AutoAssignPort>
148+
<DevelopmentServerPort>58216</DevelopmentServerPort>
149+
<DevelopmentServerVPath>/</DevelopmentServerVPath>
150+
<IISUrl>http://localhost:58216/</IISUrl>
151+
<NTLMAuthentication>False</NTLMAuthentication>
152+
<UseCustomServer>False</UseCustomServer>
153+
<CustomServerUrl>
154+
</CustomServerUrl>
155+
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
156+
</WebProjectProperties>
157+
</FlavorProperties>
158+
</VisualStudio>
159+
</ProjectExtensions>
160+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
161+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
162+
<PropertyGroup>
163+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
164+
</PropertyGroup>
165+
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
166+
</Target>
167+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
168+
Other similar extension points exist, see Microsoft.Common.targets.
169+
<Target Name="BeforeBuild">
170+
</Target>
171+
<Target Name="AfterBuild">
172+
</Target>
173+
-->
174+
</Project>

JSONAPI.TodoMVC.API/Migrations/201502061744049_Initial.Designer.cs

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
namespace JSONAPI.TodoMVC.API.Migrations
2+
{
3+
using System.Data.Entity.Migrations;
4+
5+
public partial class Initial : DbMigration
6+
{
7+
public override void Up()
8+
{
9+
CreateTable(
10+
"dbo.Todo",
11+
c => new
12+
{
13+
Id = c.String(nullable: false, maxLength: 128),
14+
Text = c.String(nullable: false),
15+
IsCompleted = c.Boolean(nullable: false),
16+
})
17+
.PrimaryKey(t => t.Id);
18+
19+
}
20+
21+
public override void Down()
22+
{
23+
DropTable("dbo.Todo");
24+
}
25+
}
26+
}
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64+
<xsd:element name="root" msdata:IsDataSet="true">
65+
<xsd:complexType>
66+
<xsd:choice maxOccurs="unbounded">
67+
<xsd:element name="metadata">
68+
<xsd:complexType>
69+
<xsd:sequence>
70+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
71+
</xsd:sequence>
72+
<xsd:attribute name="name" use="required" type="xsd:string" />
73+
<xsd:attribute name="type" type="xsd:string" />
74+
<xsd:attribute name="mimetype" type="xsd:string" />
75+
<xsd:attribute ref="xml:space" />
76+
</xsd:complexType>
77+
</xsd:element>
78+
<xsd:element name="assembly">
79+
<xsd:complexType>
80+
<xsd:attribute name="alias" type="xsd:string" />
81+
<xsd:attribute name="name" type="xsd:string" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
<xsd:element name="data">
85+
<xsd:complexType>
86+
<xsd:sequence>
87+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89+
</xsd:sequence>
90+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93+
<xsd:attribute ref="xml:space" />
94+
</xsd:complexType>
95+
</xsd:element>
96+
<xsd:element name="resheader">
97+
<xsd:complexType>
98+
<xsd:sequence>
99+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100+
</xsd:sequence>
101+
<xsd:attribute name="name" type="xsd:string" use="required" />
102+
</xsd:complexType>
103+
</xsd:element>
104+
</xsd:choice>
105+
</xsd:complexType>
106+
</xsd:element>
107+
</xsd:schema>
108+
<resheader name="resmimetype">
109+
<value>text/microsoft-resx</value>
110+
</resheader>
111+
<resheader name="version">
112+
<value>2.0</value>
113+
</resheader>
114+
<resheader name="reader">
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116+
</resheader>
117+
<resheader name="writer">
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119+
</resheader>
120+
<data name="Target" xml:space="preserve">
121+
<value>H4sIAAAAAAAEAM1X23LbNhB970z/gYOndsYRbOcl9VDJOLTdURtZnlDxO0SuZExxYQFQI31bHvpJ/YUueBepi5M4mY5eSGD3YPfw7C707+d/wncbKYI1GMu1GpOL0TkJQCU65Wo1JrlbvnpD3r39+afwNpWb4LG2e+3t0FPZMXlyLrui1CZPIJkdSZ4YbfXSjRItKUs1vTw//41eXFBACIJYQRB+zJXjEooXfI20SiB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xml:space="preserve">
124+
<value>dbo</value>
125+
</data>
126+
</root>

0 commit comments

Comments
 (0)