68 lines
2.1 KiB
C#
68 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.Extensions.Logging;
|
|
using TTSW.Controllers;
|
|
using TTSW.EF;
|
|
using TTSW.Utils;
|
|
using TTSW.Constant;
|
|
using TTSW.Common;
|
|
using TodoAPI2.Models;
|
|
using System.Data;
|
|
|
|
namespace TodoAPI2.Controllers
|
|
{
|
|
//[Authorize]
|
|
[Produces("application/json")]
|
|
[Route("api/external_linkage")]
|
|
public class external_linkageController : BaseController
|
|
{
|
|
#region Private Variables
|
|
private ILogger<external_linkageController> _logger;
|
|
private Iexternal_linkageService _repository;
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// Default constructure for dependency injection
|
|
/// </summary>
|
|
/// <param name="repository"></param>
|
|
/// <param name="logger"></param>
|
|
public external_linkageController(ILogger<external_linkageController> logger, Iexternal_linkageService repository)
|
|
{
|
|
_logger = logger;
|
|
_repository = repository;
|
|
}
|
|
|
|
///// <summary>
|
|
///// Get hrm_employee_types
|
|
///// </summary>
|
|
///// <remarks>
|
|
///// </remarks>
|
|
///// <returns>Return list of items</returns>
|
|
///// <response code="200">Returns the item</response>
|
|
///// <response code="500">Error Occurred</response>
|
|
//[HttpGet("hrm_employee_types")]
|
|
//[ProducesResponseType(typeof(List<external_linkageViewModel>), 200)]
|
|
//[ProducesResponseType(400)]
|
|
//[ProducesResponseType(500)]
|
|
////[ValidateAntiForgeryToken]
|
|
//public IActionResult Gethrm_employee_types()
|
|
//{
|
|
// try
|
|
// {
|
|
// return Ok(_repository.Gethrm_employee_types());
|
|
// }
|
|
// catch (Exception ex)
|
|
// {
|
|
// _logger.LogCritical($"Exception while get list of items.", ex);
|
|
// return StatusCode(500, $"Exception while get list of items. {ex.Message}");
|
|
// }
|
|
//}
|
|
|
|
}
|
|
}
|