Skip to content

Instantly share code, notes, and snippets.

View joeaudette's full-sized avatar

Joe Audette joeaudette

  • Concord, NC
View GitHub Profile
@joeaudette
joeaudette / gist:5fc7ebbd83ca8d775772d684c0742ce9
Created November 19, 2017 16:46
sub class cloudscribe AccountService
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;
@joeaudette
joeaudette / simplecontent not as home page
Created July 11, 2017 16:03
simplecontent not as home page
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)
{
@joeaudette
joeaudette / gist:8cf717c97501f1dd73a7abf7a058ad3b
Last active September 24, 2016 15:59
fsharp help from stackoverflow 20160924
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 }