Initial commit
This commit is contained in:
52
GerstITS.Examples.Api/Controllers/1.1/ExampleController.cs
Normal file
52
GerstITS.Examples.Api/Controllers/1.1/ExampleController.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using GerstITS.Examples.Api.Versioning;
|
||||
using GerstITS.Examples.Logic.Example;
|
||||
using GerstITS.Validation;
|
||||
using GerstITS.Web.Api;
|
||||
using GerstITS.Web.Api.FluentApi;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace GerstITS.Examples.Api.Controllers._1._1
|
||||
{
|
||||
/// <summary>
|
||||
/// Is responsible to get employee organization assignment examples.
|
||||
/// </summary>
|
||||
[ApiController,
|
||||
ApiVersion(Versions._1_1),
|
||||
Route(ApplicationEnvironment.WebApi.ControllerRouteTemplate)]
|
||||
public class ExampleController : FluentApiControllerBase
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly IExampleProvider _provider;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public ExampleController(IExampleProvider provider,
|
||||
IValidator validator)
|
||||
: base(validator)
|
||||
{
|
||||
_provider = provider;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Gets a employee organization assignment by specified id.
|
||||
/// </summary>
|
||||
/// <param name="id">Id of the employee organization assignment.</param>
|
||||
/// <returns>Returns an employee organization assignment</returns>
|
||||
[HttpGet,
|
||||
Route("{id}")]
|
||||
public IActionResult Get(int id)
|
||||
{
|
||||
return Api().Use(id)
|
||||
.Get(_provider.GetById_v1_1);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user