Esempio n. 1
0
        private Response HealthResponse()
        {
            var result = new HealthResponse {
                Response = "I am alive!"
            };

            return(Response.AsJson(result));
        }
Esempio n. 2
0
        private Response FetchDateTime(bool isLongFormat)
        {
            var dateTimeString = $"{DateTime.Now.ToShortDateString()}  {DateTime.Now.ToShortTimeString()}";

            if (isLongFormat)
            {
                dateTimeString = $"{DateTime.Now.ToLongDateString()}  {DateTime.Now.ToLongTimeString()}";
            }
            var result = new HealthResponse {
                Response = dateTimeString
            };

            return(Response.AsJson(result));
        }