)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Default2Controller (Ia.Ftn.Api.Wa.Controllers)

Public general use code classes and xml files that we've compiled and used over the years:

Default API Controller class of Fixed Telecommunications Network (FTN) model.

    1: using Microsoft.AspNetCore.Authorization;
    2: using Microsoft.AspNetCore.Mvc;
    3:  
    4: namespace Ia.Ftn.Api.Wa.Controllers
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     /// Default API Controller class of Fixed Telecommunications Network (FTN) model.
   10:     /// </summary>
   11:     /// 
   12:     /// <remarks> 
   13:     /// Copyright © 2006-2024 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   14:     /// </remarks> 
   15:     [ApiController]
   16:     //[Authorize]
   17:     public class Default2Controller : ControllerBase
   18:     {
   19:         ////////////////////////////////////////////////////////////////////////////
   20:  
   21:         /// <summary>
   22:         /// Echo the passed string
   23:         /// </summary>
   24:         [HttpGet]
   25:         [Route("api/v1/echo/{text}")]
   26:         public string Echo(string text)
   27:         {
   28:             return text;
   29:         }
   30:  
   31:         ////////////////////////////////////////////////////////////////////////////
   32:  
   33:         /// <summary>
   34:         /// Return current time
   35:         /// </summary>
   36:         [HttpGet]
   37:         [Route("api/v1/time")]
   38:         public string Time()
   39:         {
   40:             return DateTime.UtcNow.AddHours(3).ToString("yyyy-MM-dd HH:mm:ss.fff");
   41:         }
   42:  
   43:         ////////////////////////////////////////////////////////////////////////////
   44:         ////////////////////////////////////////////////////////////////////////////
   45:     }
   46: }