Skip to content

Instantly share code, notes, and snippets.

View cyptus's full-sized avatar

cyptus

View GitHub Profile
@cyptus
cyptus / AESThenHMAC.cs
Last active November 21, 2019 14:18
aspnet core 2.2 reset password with custom token provider using AES
See https://gist.github.com/jbtule/4336842#file-aesthenhmac-cs
@cyptus
cyptus / JobStartup.cs
Last active October 25, 2019 07:31
C# Azure WebJob v3
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace WebJobs
{
public class JobStartup : IWebJobsStartup
{
public void Configure(IWebJobsBuilder builder)
{
public class BinaryConverter
{
public static BinaryConverter Instance => new BinaryConverter();
public byte[] ToBinary<T>(T message) where T : class, new()
{
var bf = new BinaryFormatter();
using (var ms = new MemoryStream())
{
@cyptus
cyptus / efcoretest.cs
Created October 16, 2018 18:45
ef core hasqueryfilter exception on include
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
namespace EFCoreTest
{
public class Program