This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using cloudscribe.Core.Models; | |
using cloudscribe.Core.Web.Components; | |
using cloudscribe.Core.Web.ViewModels.SiteUser; | |
using Microsoft.AspNetCore.Identity; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Collections.Generic; | |
using System.Security.Claims; | |
using System.Threading; | |
using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This sample come from cloudscribe.com site where I use home controller and index view for home page and have /docs as the starting point for simplecontent pages | |
My routing looks like this: | |
private void UseMvc(IApplicationBuilder app, bool useFolders) | |
{ | |
app.UseMvc(routes => | |
{ | |
if (useFolders) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this compiles and works: | |
[<HttpGet("{id}", Name = "GetFsToDo")>] | |
member __.Get(id) = | |
async { | |
let! data = Async.AwaitTask(__.Queries.Find(id)) | |
if isNull data | |
then return __.NotFound() :> IActionResult | |
else | |
return new ObjectResult(data) :> IActionResult } |