Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. ...
  2.  
  3. namespace MDM.Api.Features.V1.Sources {
  4.  
  5.    // Will be supported from version "1.0" onwards
  6.    [ApiVersions("1.0")]
  7.    [RoutePrefix("v{version:apiVersion}/sources")]
  8.    public class SourcesController : ApiController {
  9.  
  10.       // We override the default controller versioning for this specific endpoint.
  11.       // Will be supported from version "1.0" until version "2.0", inclusive.
  12.       // The last parameter marks the endpoint as deprecated.
  13.       [ApiVersion("1.0", "2.0", true)]
  14.       [HttpGet]
  15.       public async Task<IHttpActionResult> Get() {
  16.           ...
  17.       }
  18.    }
  19. }
  20.  
  21. namespace MDM.Api.Features.V3.Sources {
  22.  
  23.    // Will be supported from version "3.0" onwards
  24.    [ApiVersions("3.0")]
  25.    [RoutePrefix("v{version:apiVersion}/sources")]
  26.    public class SourcesController : ApiController {
  27.  
  28.       [HttpGet]
  29.       public async Task<IHttpActionResult> Get() {
  30.           ...
  31.       }
  32.    }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement