Click here to Skip to main content
15,885,366 members
Articles / Web Development / HTML

A simple POC using ASP.NET Web API, Entity Framework, Autofac, Cross Domain Support

Rate me:
Please Sign up or sign in to vote.
4.92/5 (43 votes)
27 Oct 2012CPOL11 min read 339.1K   8.3K   154  
The purpose of this article is to create a proof of concept to demonstrate the feasibility of ASP.NET Web API Beta Version.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{F192D525-50F8-4A56-83E2-63CCA1D6B5DD}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Application.Model</RootNamespace>
    <AssemblyName>Application.Model</AssemblyName>
    <TargetFrameworkVersion>v4.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="EntityFramework">
      <HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
    </Reference>
    <Reference Include="Newtonsoft.Json">
      <HintPath>..\packages\Newtonsoft.Json.4.5.10\lib\net40\Newtonsoft.Json.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.DataAnnotations" />
    <Reference Include="System.Core" />
    <Reference Include="System.Data.Entity" />
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.Security" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Address.cs" />
    <Compile Include="AdventureWorks.Context.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>AdventureWorks.Context.tt</DependentUpon>
    </Compile>
    <Compile Include="AdventureWorks.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>AdventureWorks.edmx</DependentUpon>
    </Compile>
    <Compile Include="Customer.cs" />
    <Compile Include="CustomerAddress.cs" />
    <Compile Include="DTO\CustomerDTO.cs" />
    <Compile Include="DTO\InvoiceDTO.cs" />
    <Compile Include="DTO\ProductDTO.cs" />
    <Compile Include="DTO\SalesOrderDTO.cs" />
    <Compile Include="Product.cs" />
    <Compile Include="ProductCategory.cs" />
    <Compile Include="ProductDescription.cs" />
    <Compile Include="ProductModel.cs" />
    <Compile Include="ProductModelProductDescription.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="SalesOrderDetail.cs" />
    <Compile Include="SalesOrderHeader.cs" />
  </ItemGroup>
  <ItemGroup>
    <EntityDeploy Include="AdventureWorks.edmx">
      <Generator>EntityModelCodeGenerator</Generator>
      <LastGenOutput>AdventureWorks.Designer.cs</LastGenOutput>
    </EntityDeploy>
    <None Include="AdventureWorks.Context.tt">
      <Generator>TextTemplatingFileGenerator</Generator>
      <DependentUpon>AdventureWorks.edmx</DependentUpon>
      <LastGenOutput>AdventureWorks.Context.cs</LastGenOutput>
    </None>
    <None Include="AdventureWorks.edmx.diagram">
      <DependentUpon>AdventureWorks.edmx</DependentUpon>
    </None>
    <None Include="App.Config" />
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
  </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>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions