Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
54c3f03
Migrate from .sln to .slnx
commonsensesoftware Dec 28, 2025
f61712f
Update sign tool
commonsensesoftware Dec 28, 2025
a0acada
Baseline migration to .NET 10 for release 10.0
commonsensesoftware Dec 30, 2025
235a950
Remove back-compat workarounds used in .NET 8
commonsensesoftware Jan 11, 2026
3b657cd
Collapse the DefaultApiVersionGroupDescriptionProvider into the Group…
commonsensesoftware Jan 11, 2026
304d7ed
Add support for the API Versioning, the API Explorer, and OpenAPI. Re…
commonsensesoftware Feb 8, 2026
f11f34d
Remove obsolete code
commonsensesoftware Feb 8, 2026
f5a5322
Update existing extension methods to use the extension member syntax.…
commonsensesoftware Feb 8, 2026
a7d17fa
Add support to control how the OpenAPI document description is render…
commonsensesoftware Feb 8, 2026
5f72f39
Bump the SourceLink package version
commonsensesoftware Feb 8, 2026
2d7a771
Add OpenAPI test project
commonsensesoftware Feb 9, 2026
63d81cf
Fix DI registration and make API Explorer transformer public
commonsensesoftware Feb 9, 2026
938b721
Update file name to *.slnx and CodeQL V3
commonsensesoftware Feb 9, 2026
fbc80c9
Move files to correct folder and namespace
commonsensesoftware Feb 9, 2026
ae90002
Update references after namespace move
commonsensesoftware Feb 9, 2026
b6d40d0
Refactor Minimal API support to make the setups consistent
commonsensesoftware Feb 10, 2026
8d29a60
Refactor XML comment support to support more standard tags and enable…
commonsensesoftware Feb 10, 2026
e09ef1a
Move types to new folder
commonsensesoftware Feb 10, 2026
0b04fe8
Rename namespace
commonsensesoftware Feb 10, 2026
09e75d0
Move to new folder
commonsensesoftware Feb 10, 2026
e6879ff
Unify and simplify configuring versioned OpenAPI options
commonsensesoftware Feb 10, 2026
b987be3
Update to CodeQL v4
commonsensesoftware Feb 10, 2026
3cb23bc
Update build dependencies to .NET 10
commonsensesoftware Feb 10, 2026
1c5cfc9
Add remaining OpenAPI tests
commonsensesoftware Feb 10, 2026
1969960
Include Description property when cloning. Relates to #1160
commonsensesoftware Feb 10, 2026
7c495d3
Fix merge conflicts, code clean up, and integrate deprecation policies
commonsensesoftware Feb 16, 2026
8a7e238
Remove EnableApiVersionBinding extension
commonsensesoftware Feb 16, 2026
3ef8233
Fix default visibility of OData endpoints
commonsensesoftware Feb 16, 2026
f128b32
Version-neutral APIs should be deprecated if they have an effective p…
commonsensesoftware Feb 16, 2026
65a6c8e
Complete update web API examples
commonsensesoftware Feb 16, 2026
0013cba
Update OData examples
commonsensesoftware Feb 16, 2026
4b52711
Update Web API examples
commonsensesoftware Feb 16, 2026
e7de634
Apply CodeQL and Copilot suggestions
commonsensesoftware Feb 16, 2026
102031a
Remove useless assignment
commonsensesoftware Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"isRoot": true,
"tools": {
"sign": {
"version": "0.9.1-beta.23530.1",
"version": "0.9.1-beta.25379.1",
"commands": [
"sign"
]
],
"rollForward": false
}
}
}
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"remoteEnv": {
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
"DOTNET_MULTILEVEL_LOOKUP": "0",
"TARGET": "net8.0",
"TARGET": "net10.0",
"DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER": "true"
},
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
Expand Down
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ dotnet_diagnostic.SA1010.severity = none # Opening square brackets should be spa
dotnet_diagnostic.ASP0022.severity = none # Route conflict detected between route handlers
dotnet_diagnostic.ASP0023.severity = none # Route conflict detected between route handlers

# TEMP: temporary suppression for false positives
# BUG: https://github.com/dotnet/sdk/issues/51681
# BUG: https://github.com/dotnet/sdk/issues/51716
[*Extensions.cs]
dotnet_diagnostic.CA1034.severity = none
dotnet_diagnostic.CA1708.severity = none

# test settings

# Default severity for analyzer diagnostics with category 'Reliability'
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.slnx merge=binary
#*.slnf merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
queries: security-and-quality
languages: csharp
Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-dotnet@v3
id: installdotnet
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x

- name: Create temporary global.json
run: echo '{"sdk":{"version":"${{ steps.installdotnet.outputs.dotnet-version }}"}}' > ./global.json
Expand All @@ -43,7 +43,7 @@ jobs:
shell: pwsh
run: |
$start = (Get-Location).Path.Length + 1
$sln = Join-Path '..' 'asp.sln'
$sln = Join-Path '..' 'asp.slnx'
$projects = Get-ChildItem src -Include src -Recurse | `
ForEach-Object { Get-ChildItem $_.FullName -Filter *.csproj -Recurse } | `
ForEach-Object { $_.FullName.Substring($start) }
Expand All @@ -54,4 +54,4 @@ jobs:
dotnet build $slnf.FullName --configuration Release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

# ASP.NET API Versioning

| :mega: Check out the [announcement](../../discussions/807) regarding upcoming changes |
|-|

<img align="right" width="100px" src="logo.svg" />

The _"Asp"_ project, more formally known as ASP.NET API Versioning, gives you a powerful, but easy-to-use method for
Expand Down
512 changes: 0 additions & 512 deletions asp.sln

This file was deleted.

154 changes: 154 additions & 0 deletions asp.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<Solution>
<Folder Name="/.config/">
<File Path=".config/dotnet-tools.json" />
</Folder>
<Folder Name="/.devcontainer/">
<File Path=".devcontainer/Dockerfile" />
<File Path=".devcontainer/devcontainer.json" />
</Folder>
<Folder Name="/.devcontainer/scripts/">
<File Path=".devcontainer/scripts/container-creation.sh" />
</Folder>
<Folder Name="/.github/">
<File Path=".github/dependabot.yml" />
<File Path=".github/pull_request_template.md" />
</Folder>
<Folder Name="/.github/ISSUE_TEMPLATE/">
<File Path=".github/ISSUE_TEMPLATE/10_bug_report.yml" />
<File Path=".github/ISSUE_TEMPLATE/20_feature_request.yml" />
<File Path=".github/ISSUE_TEMPLATE/30_api_proposal.md" />
<File Path=".github/ISSUE_TEMPLATE/config.yml" />
</Folder>
<Folder Name="/.github/workflows/">
<File Path=".github/workflows/codeql-analysis.yml" />
</Folder>
<Folder Name="/.vscode/">
<File Path=".vscode/extensions.json" />
<File Path=".vscode/launch.json" />
<File Path=".vscode/project.code-snippets" />
<File Path=".vscode/settings.json" />
<File Path=".vscode/tasks.json" />
</Folder>
<Folder Name="/docs/">
<File Path="docs/CONTRIBUTING.md" />
</Folder>
<Folder Name="/(misc)/">
<File Path=".editorconfig" />
<File Path=".gitattributes" />
<File Path=".gitignore" />
<File Path="azure-pipelines.yml" />
<File Path="LICENSE.txt" />
<File Path="logo.svg" />
<File Path="nuget.config" />
<File Path="README.md" />
</Folder>
<Folder Name="/build/">
<Project Path="build/assets.msbuildproj" Type="13b669be-bb05-4ddf-9536-439f39a36129" />
</Folder>
<Folder Name="/examples/">
<File Path="examples/.editorconfig" />
<File Path="examples/Directory.Build.props" />
</Folder>
<Folder Name="/examples/AspNet/">
<File Path="examples/AspNet/Directory.Build.props" />
<File Path="examples/AspNet/Startup.Newtonsoft.cs" />
</Folder>
<Folder Name="/examples/AspNet/OData/">
<Project Path="examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.csproj" />
<Project Path="examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.csproj" />
<Project Path="examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.csproj" />
<Project Path="examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.csproj" />
<Project Path="examples/AspNet/OData/SomeOpenApiODataWebApiExample/SomeOpenApiODataWebApiExample.csproj" />
</Folder>
<Folder Name="/examples/AspNet/WebApi/">
<Project Path="examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.csproj" />
<Project Path="examples/AspNet/WebApi/ByNamespaceWebApiExample/ByNamespaceWebApiExample.csproj" />
<Project Path="examples/AspNet/WebApi/ConventionsWebApiExample/ConventionsWebApiExample.csproj" />
<Project Path="examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.csproj" />
</Folder>
<Folder Name="/examples/AspNetCore/" />
<Folder Name="/examples/AspNetCore/OData/">
<File Path="examples/AspNetCore/OData/Directory.Build.props" />
<Project Path="examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.csproj" />
<Project Path="examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.csproj" />
<Project Path="examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.csproj" />
<Project Path="examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.csproj" />
<Project Path="examples/AspNetCore/OData/SomeODataOpenApiExample/SomeODataOpenApiExample.csproj" />
</Folder>
<Folder Name="/examples/AspNetCore/WebApi/">
<Project Path="examples/AspNetCore/WebApi/BasicExample/BasicExample.csproj" />
<Project Path="examples/AspNetCore/WebApi/ByNamespaceExample/ByNamespaceExample.csproj" />
<Project Path="examples/AspNetCore/WebApi/ConventionsExample/ConventionsExample.csproj" />
<Project Path="examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.csproj" />
<Project Path="examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.csproj" />
<Project Path="examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.csproj" />
</Folder>
<Folder Name="/src/">
<File Path="src/Directory.Build.props" />
<File Path="src/Directory.Build.targets" />
</Folder>
<Folder Name="/src/Abstractions/" />
<Folder Name="/src/Abstractions/src/">
<Project Path="src/Abstractions/src/Asp.Versioning.Abstractions/Asp.Versioning.Abstractions.csproj" />
</Folder>
<Folder Name="/src/Abstractions/test/">
<Project Path="src/Abstractions/test/Asp.Versioning.Abstractions.Tests/Asp.Versioning.Abstractions.Tests.csproj" />
</Folder>
<Folder Name="/src/AspNet/" />
<Folder Name="/src/AspNet/src/">
<Project Path="src/AspNet/OData/src/Asp.Versioning.WebApi.OData.ApiExplorer/Asp.Versioning.WebApi.OData.ApiExplorer.csproj" />
<Project Path="src/AspNet/OData/src/Asp.Versioning.WebApi.OData/Asp.Versioning.WebApi.OData.csproj" />
<Project Path="src/AspNet/WebApi/src/Asp.Versioning.WebApi.ApiExplorer/Asp.Versioning.WebApi.ApiExplorer.csproj" />
<Project Path="src/AspNet/WebApi/src/Asp.Versioning.WebApi/Asp.Versioning.WebApi.csproj" />
</Folder>
<Folder Name="/src/AspNet/test/">
<Project Path="src/AspNet/Acceptance/Asp.Versioning.WebApi.Acceptance.Tests/Asp.Versioning.WebApi.Acceptance.Tests.csproj" />
<Project Path="src/AspNet/OData/test/Asp.Versioning.WebApi.OData.ApiExplorer.Tests/Asp.Versioning.WebApi.OData.ApiExplorer.Tests.csproj" />
<Project Path="src/AspNet/OData/test/Asp.Versioning.WebApi.OData.Tests/Asp.Versioning.WebApi.OData.Tests.csproj" />
<Project Path="src/AspNet/WebApi/test/Asp.Versioning.WebApi.ApiExplorer.Tests/Asp.Versioning.WebApi.ApiExplorer.Tests.csproj" />
<Project Path="src/AspNet/WebApi/test/Asp.Versioning.WebApi.Tests/Asp.Versioning.WebApi.Tests.csproj" />
</Folder>
<Folder Name="/src/AspNetCore/" />
<Folder Name="/src/AspNetCore/src/">
<Project Path="src/AspNetCore/OData/src/Asp.Versioning.OData.ApiExplorer/Asp.Versioning.OData.ApiExplorer.csproj" />
<Project Path="src/AspNetCore/OData/src/Asp.Versioning.OData/Asp.Versioning.OData.csproj" />
<Project Path="src/AspNetCore/WebApi/src/Asp.Versioning.Http/Asp.Versioning.Http.csproj" />
<Project Path="src/AspNetCore/WebApi/src/Asp.Versioning.Mvc.ApiExplorer/Asp.Versioning.Mvc.ApiExplorer.csproj" />
<Project Path="src/AspNetCore/WebApi/src/Asp.Versioning.Mvc/Asp.Versioning.Mvc.csproj" />
<Project Path="src/AspNetCore/WebApi/src/Asp.Versioning.OpenApi/Asp.Versioning.OpenApi.csproj" />
</Folder>
<Folder Name="/src/AspNetCore/test/">
<Project Path="src/AspNetCore/Acceptance/Asp.Versioning.Mvc.Acceptance.Tests/Asp.Versioning.Mvc.Acceptance.Tests.csproj" />
<Project Path="src/AspNetCore/OData/test/Asp.Versioning.OData.ApiExplorer.Tests/Asp.Versioning.OData.ApiExplorer.Tests.csproj" />
<Project Path="src/AspNetCore/OData/test/Asp.Versioning.OData.Tests/Asp.Versioning.OData.Tests.csproj" />
<Project Path="src/AspNetCore/WebApi/test/Asp.Versioning.Http.Tests/Asp.Versioning.Http.Tests.csproj" />
<Project Path="src/AspNetCore/WebApi/test/Asp.Versioning.Mvc.ApiExplorer.Tests/Asp.Versioning.Mvc.ApiExplorer.Tests.csproj" />
<Project Path="src/AspNetCore/WebApi/test/Asp.Versioning.Mvc.Tests/Asp.Versioning.Mvc.Tests.csproj" />
<Project Path="src/AspNetCore/WebApi/test/Asp.Versioning.OpenApi.Tests/Asp.Versioning.OpenApi.Tests.csproj" />
</Folder>
<Folder Name="/src/Client/" />
<Folder Name="/src/Client/src/">
<Project Path="src/Client/src/Asp.Versioning.Http.Client/Asp.Versioning.Http.Client.csproj" />
</Folder>
<Folder Name="/src/Client/test/">
<Project Path="src/Client/test/Asp.Versioning.Http.Client.Tests/Asp.Versioning.Http.Client.Tests.csproj" />
</Folder>
<Folder Name="/src/Common/" />
<Folder Name="/src/Common/src/">
<Project Path="src/Common/src/Common.ApiExplorer/Common.ApiExplorer.shproj" />
<Project Path="src/Common/src/Common.Backport/Common.Backport.msbuildproj" Type="13b669be-bb05-4ddf-9536-439f39a36129" />
<Project Path="src/Common/src/Common.Mvc/Common.Mvc.shproj" />
<Project Path="src/Common/src/Common.OData.ApiExplorer/Common.OData.ApiExplorer.shproj" />
<Project Path="src/Common/src/Common.OData/Common.OData.shproj" />
<Project Path="src/Common/src/Common.ProblemDetails/Common.ProblemDetails.shproj" />
<Project Path="src/Common/src/Common.TypeInfo/Common.TypeInfo.shproj" />
<Project Path="src/Common/src/Common/Common.shproj" />
</Folder>
<Folder Name="/src/Common/test/">
<Project Path="src/Common/test/Common.Acceptance.Tests/Common.Acceptance.Tests.shproj" />
<Project Path="src/Common/test/Common.Mvc.Tests/Common.Mvc.Tests.shproj" />
<Project Path="src/Common/test/Common.OData.ApiExplorer.Tests/Common.OData.ApiExplorer.Tests.shproj" />
<Project Path="src/Common/test/Common.OData.Tests/Common.OData.Tests.shproj" />
<Project Path="src/Common/test/Common.Tests/Common.Tests.shproj" />
</Folder>
</Solution>
2 changes: 1 addition & 1 deletion build/nuget.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>

<ItemGroup Label="SourceLink">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0-*" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.0-*" PrivateAssets="All"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion build/steps-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
displayName: Install .NET SDK
inputs:
packageType: sdk
version: 8.0.x # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
version: 10.0.x # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json

- task: DotNetCoreCLI@2
displayName: Build and Test
Expand Down
4 changes: 4 additions & 0 deletions build/test.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<Nullable>disable</Nullable>
<IsClsCompliant>false</IsClsCompliant>
<NoWarn>$(NoWarn);CA1515</NoWarn>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
<AcceptanceTestPrefix Condition="$(MSBuildProjectName.Contains('Acceptance'))">acceptance.</AcceptanceTestPrefix>
</PropertyGroup>

Expand Down
32 changes: 8 additions & 24 deletions build/test.targets
Original file line number Diff line number Diff line change
@@ -1,40 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<FluentAssertionsVersion>6.8.0</FluentAssertionsVersion>

<!--
beware of other versions that may contain SponsorLink
REF: https://github.com/moq/moq/issues/1372
-->
<MoqVersion>4.20.69</MoqVersion>
<XunitRunnerVersion>2.5.0</XunitRunnerVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
<MoqVersion>4.17.2</MoqVersion>
<XunitRunnerVersion>2.4.3</XunitRunnerVersion>
</PropertyGroup>

<ItemGroup Condition=" '$(IsSharedProject)' == 'false' ">
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0-*" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVersion)" />
<PackageReference Include="FluentAssertions" Version="8.8.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" />
<PackageReference Include="Microsoft.Testing.Platform.MSBuild" Version="2.*" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="xunit.v3.mtp-v2" Version="3.*" />
</ItemGroup>

<ItemGroup Condition=" '$(IsAspNetCore)' == 'true' ">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(DotNetReleaseBasePackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(DotNetReleaseBasePackageVersion).*" />
</ItemGroup>

<ItemGroup>
<Using Include="FluentAssertions" />
<Using Include="Moq" />
<Using Include="Xunit" />
<Using Include="Xunit.Abstractions" />
<Using Include="Xunit.Sdk" />
<Using Include="Xunit.v3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/AspNet/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNet.WebApi.OwinSelfHost" Version="5.2.9" />
<PackageReference Include="Microsoft.AspNet.WebApi.OwinSelfHost" Version="5.3.*" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class OrdersController : ApiController
{
// GET ~/api/orders
// GET ~/api/orders?api-version=1.0
public IHttpActionResult Get( ApiVersion version ) =>
public IHttpActionResult Get( ApiVersion version ) =>
Ok( new[] { new Order() { Id = 1, Customer = $"Customer v{version}" } } );

// GET ~/api/orders/{id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,32 @@ public IHttpActionResult Get( ODataQueryOptions<Person> options, ApiVersion vers
[ODataRoute( "{id}" )]
public IHttpActionResult Get( int id, ODataQueryOptions<Person> options, ApiVersion version ) =>
Ok( new Person()
{
Id = id,
FirstName = "Bill",
LastName = "Mei",
Email = "bill.mei@somewhere.com",
{
Id = id,
FirstName = "Bill",
LastName = "Mei",
Email = "bill.mei@somewhere.com",
Phone = "555-555-5555",
} );

// PATCH ~/api/people/{id}?api-version=2.0
[MapToApiVersion( "2.0" )]
[ODataRoute( "{id}" )]
public IHttpActionResult Patch(
int id,
Delta<Person> delta,
ODataQueryOptions<Person> options,
public IHttpActionResult Patch(
int id,
Delta<Person> delta,
ODataQueryOptions<Person> options,
ApiVersion version )
{
if ( !ModelState.IsValid )
return BadRequest( ModelState );

var person = new Person()
{
Id = id,
FirstName = "Bill",
LastName = "Mei",
Email = "bill.mei@somewhere.com",
{
Id = id,
FirstName = "Bill",
LastName = "Mei",
Email = "bill.mei@somewhere.com",
Phone = "555-555-5555",
};

Expand Down
Loading
Loading