Skip to content

Instantly share code, notes, and snippets.

Avatar
💯
building saas solutions

Mubarak Imam mimam419

💯
building saas solutions
View GitHub Profile
@mimam419
mimam419 / RSAAuth.cs
Created Mar 9, 2020
JWT Authentication with RSA Keys
View RSAAuth.cs
using System;
using System.Security.Cryptography;
using Microsoft.IdentityModel.JsonWebTokens;
using Microsoft.IdentityModel.Tokens;
public class RSAAuth
{
[Fact]
public void RSATest
@mimam419
mimam419 / dnc-bootstrap
Created Nov 29, 2019
Create new ASP.NET Core solution with Entities class library, Data class library and Web MVC project
View dnc-bootstrap
#!/bin/bash
# create new solution based on input argument
create_new_solution () {
local root_dir=$1
echo creating solution : $root_dir
# create solution directory
mkdir $root_dir
dotnet new sln -o $root_dir
View DbContextFactory.cs
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Multitenant.Models;
using MultiTenant.Data.Interfaces;
namespace Multitenant.Data
{
public class DbContextFactory : IDbContextFactory
{
public ApplicationDbContext CreateDbContext(Tenant tenant, IConfiguration configuration)
You can’t perform that action at this time.