Skip to content

Instantly share code, notes, and snippets.

@sfmskywalker
sfmskywalker / IPasswordHasher.cs
Created November 2, 2019 09:40
IPasswordHasher.cs - Building Workflow Driven .NET Core Applications with Elsa
using Elsa.Samples.UserRegistration.Web.Models;
namespace Elsa.Samples.UserRegistration.Web.Services
{
public interface IPasswordHasher
{
HashedPassword HashPassword(string password);
HashedPassword HashPassword(string password, byte[] salt);
}
}
@sfmskywalker
sfmskywalker / appsettings.json
Created November 2, 2019 09:12
appsettings.json - Building Workflow Driven .NET Core Applications with Elsa
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
@sfmskywalker
sfmskywalker / Startup.cs
Created November 2, 2019 09:10
Startup.cs - Building Workflow Driven .NET Core Applications with Elsa
using Elsa.Activities.Email.Extensions;
using Elsa.Activities.Http.Extensions;
using Elsa.Activities.Timers.Extensions;
using Elsa.Dashboard.Extensions;
using Elsa.Extensions;
using Elsa.Persistence.MongoDb.Extensions;
using Elsa.Samples.UserRegistration.Web.Extensions;
using Elsa.Samples.UserRegistration.Web.Handlers;
using Elsa.Samples.UserRegistration.Web.Models;
using Elsa.Samples.UserRegistration.Web.Services;
@sfmskywalker
sfmskywalker / site.css
Created November 2, 2019 08:47
site.css - Building Workflow Driven .NET Core Applications with Elsa
html,
body, app {
height: 100%;
}
app {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
@sfmskywalker
sfmskywalker / Index.razor
Last active November 3, 2019 11:17
Index.razor - Building Workflow Driven .NET Core Applications with Elsa
@page "/"
<div class="form-signup">
<EditForm Model="@RegistrationModel" OnValidSubmit="@HandleFormSubmission" hidden="@ShowConfirmation">
<h1 class="h3 mb-3 font-weight-normal">Please register</h1>
<DataAnnotationsValidator/>
<ValidationSummary/>
@sfmskywalker
sfmskywalker / MainLayout.razor
Created November 2, 2019 08:26
MainLayout - Building Workflow Driven .NET Core Applications with Elsa
@inherits Microsoft.AspNetCore.Components.LayoutComponentBase
@Body
@sfmskywalker
sfmskywalker / RegistrationModel.cs
Created November 2, 2019 08:21
RegistrationModel - Building Workflow Driven .NET Core Applications with Elsa
using System.ComponentModel.DataAnnotations;
namespace Elsa.Samples.UserRegistration.Web.Models
{
public class RegistrationModel
{
[Required]
public string Name { get; set; }
[Required]
@sfmskywalker
sfmskywalker / generate-theme.cmd
Created July 29, 2018 20:35
Generate a new theme
dotnet new octheme -n "MadeWithLoveTheme"
@sfmskywalker
sfmskywalker / InstallCodeGenerationTemplates.cmd
Created July 29, 2018 20:27
Installs the Orchard Core Code Generation Templates
dotnet new -i OrchardCore.Cms.Templates::1.0.0-beta2-*
@sfmskywalker
sfmskywalker / npm-install.cmd
Last active July 29, 2018 20:04
Executes the NPM Install command
cd ClientApp
npm install
ng build