public IActionResult GetAllRootLinks()
        {
            var response = new RootPages();

            response.Links.Add(new Link(UrlHelper.Link(nameof(GetAllRootLinks), null), "self", "GET"));
            response.Links.Add(new Link(UrlHelper.Link(nameof(ItemsController.GetAllItemsAsync), null), "items_home", "GET"));

            return(Ok(response));
        }
Example #2
0
        /// <summary>
        /// Creates and returns a <see cref="CeidDiplomatikiOptionsDataModel"/> from the current <see cref="CeidDiplomatikiManager"/>
        /// </summary>
        /// <returns></returns>
        public CeidDiplomatikiOptionsDataModel ToOptions() => new CeidDiplomatikiOptionsDataModel()
        {
            // Set the databases
            MySQLDatabases      = MySQLDatabases.ToArray(),
            PostgreSQLDatabases = PostgreSQLDatabases.ToArray(),
            SQLiteDatabases     = SQLiteDatabases.ToArray(),
            SQLServerDatabases  = SQLServerDatabases.ToArray(),

            // Set the query maps
            QueryMaps = QueryMaps.Select(x => x.ToDataModel()).ToArray(),

            // Set the page maps
            PageMaps = RootPages.Select(x => x.ToDataModel()).ToArray()
        };