Nano ASP Boilerplate
Nano ASP Boilerplate
  • 7
  • 21 099
ASP.NET Multi-Tenant SaaS App | Deploy to Azure Elastic Database Pool | 20 Min Tutorial + GitHub
We'll publish a multi-tenant application to Azure and use an Elastic Database Pool to manage separate tenant databases.
Lean how to set up Azure resources in the cloud and within your code using Azure SDK NuGet packages. Step by step guide with accompanying GitHub source code.
In this 20 minute lesson, gain a better understanding of multi-tenant architecture. Multi-tenant architecture is essential for any SaaS or modern web application.
GITHUB:
STARTING: github.com/aspnano/multiTenantAppMdb
FINISHED: github.com/aspnano/multiTenantAppMdbAzure
TUTORIAL:
aspnano.com/deploy-multi-tenant-azure-elastic-database-pool/
VIDEO PART 1:
ua-cam.com/video/Cm1UXLm-vPc/v-deo.html
VIDEO PART 2:
ua-cam.com/video/Q-CI5SeCaT8/v-deo.html
NANO ASP.NET BOILERPLATE:
aspnano.com/
0:00 - Intro
0:20 - The Simple Multi-Tenant App
2:27 - Set up Azure Elastic Database Pool
5:40 - Create App Service
9:35 - Add Azure Role Assignment
11:50 - Refactor the code
17:40 - Test locally with Postman
18:07 - Publish to Azure
18:40 - Test production with Postman
21:30 - Resources
Переглядів: 327

Відео

Building CRUD Features in .NET: Generate Services & Controllers with Nano Boilerplate CLI Tool
Переглядів 223Місяць тому
The Nano Boilerplate is an adaptable .NET template which allows you to build modern web applications, with multi-tenant features, in record time. In this video, we'll take a look at how to build a new CRUD feature in our .NET application. This is just a small example but it shows how easy it is to create new apps, and build features with the Nano Boilerplate. The bulk of the code can be generat...
Creating .NET Apps with Nano Boilerplate CLI: Multi-Tenant SaaS Template
Переглядів 244Місяць тому
The Nano Boilerplate is an adaptable .NET template which allows you to build modern web applications, with multi-tenant features, in record time. Part 2 of this video: ua-cam.com/video/52WZOmtr-l4/v-deo.html Check out the installation instructions here: aspnano.com/guide/dotnet-setup/ Using the CLI tool aspnano.com/guide/using-the-cli-tool/ Building CRUD endpoints: aspnano.com/build-crud-api-en...
ASP.NET Multi-Tenant SaaS App | Multiple Databases - 20 Minute Tutorial + GitHub (Part 2)
Переглядів 3,3 тис.5 місяців тому
A continuation of Learn how to build a Multi-Tenant SaaS App using ASP.NET and Entity Framework Core. We extend our multi-tenant .NET application to support database per-tenant and hybrid multi-tenancy strategies. Step by step tutorial on how to save each tenant's data on their own database and handle migrations across multiple databases. In this 20 minute lesson, gain a better understanding of...
Nano ASP.NET Boilerplate | Multi-Tenant SaaS Template | Vue, React, Razor UI
Переглядів 8046 місяців тому
Launch SaaS & MVPs in record time with the Nano ASP.NET Boilerplate. Un-opinionated, clean-architecture, multi-tenant, plus essential infrastructure. The latest .NET, C# ASP.NET back-end with Vue, React, and Razor pages UIs. Bootstrap 5 theme with full range of components, light and dark mode. Complete documentation and attentive support. The ideal starter project for individuals and small team...
ASP.NET Multi-Tenant SaaS App in 20 Minutes (EF Core) - Free Tutorial + GitHub Code Project
Переглядів 15 тис.11 місяців тому
Learn how to build a Multi-Tenant SaaS App using ASP.NET and Entity Framework Core. In less than 20 minutes understand the essential components that make up multi-tenant architecture using query filters and middleware. Multi-tenant architecture is essential for any SaaS or modern web application. VIDEO PART 2: ua-cam.com/video/Q-CI5SeCaT8/v-deo.html TUTORIAL / SAMPLE CODE : PART 1: aspnano.com/...
ASP.NET Core - Dependency Injection, Interfaces, & Services
Переглядів 1,2 тис.Рік тому
Talking about Dependency Injection in .NET Core 7, with service architecture and interfaces for context. TUTORIAL / SAMPLE CODE : aspnano.com/dependency-injection-in-asp-net-core-example-project-and-code-net-7/ BLOG: aspnano.com/blog/ NANO BOILERPLATE: aspnano.com/ 0:00 - Intro 0:20 - Service Architecture 2:45 - The Constructor Method with Interfaces 4:48 - Interfaces Explained 6:33 - Registeri...

КОМЕНТАРІ

  • @aadeshyadav48
    @aadeshyadav48 День тому

    Thanks dear :)

  • @TheMezanine
    @TheMezanine 7 днів тому

    Thank you so much!!!

  • @ibrahimsherif3261
    @ibrahimsherif3261 19 днів тому

    Great video! thanks a lot for your efforts

  • @AhmedGamal-it8ru
    @AhmedGamal-it8ru Місяць тому

    Thanks very much

  • @jheyssonapazamonasterio2110
    @jheyssonapazamonasterio2110 Місяць тому

    8:24 dotnet ef migrations add Initial

  • @johnbhatt
    @johnbhatt Місяць тому

    This is by far the best tutorial available on MultiTenancy. I tried to look for others but this one is properly designed for newbie like me. Its fast paced and hopefully it was done intentionally to keep video short. If he tried to explain everything and write code as we watch, this should be more than 1 hour. Thank you @aspnano

  • @charlesthompson8938
    @charlesthompson8938 Місяць тому

    Awesome work!

  • @proveit99
    @proveit99 2 місяці тому

    WoW, amazing!

  • @oscargarin
    @oscargarin 2 місяці тому

    Hi, very interesting! A SaaS question: Does it allow users to to pay with stripe? I did not see the plans/subscription funcionality in the video.

  • @caseyspaulding
    @caseyspaulding 3 місяці тому

    💯Thank you

  • @CarCan316
    @CarCan316 3 місяці тому

    Great stuff - if we can see how to do this using Identity for the authentication, sign up, etc., if would make this thing AWSOME!

    • @aspnano
      @aspnano 3 місяці тому

      Thats done in the Nano boilerplate, check it out!

  • @csilipo
    @csilipo 4 місяці тому

    I’ve just been playing around with C#. But I’m confused with with c#. I’m come from php world. My question is: what do you recommend some learning resources in C#, like interfaces …traits… etc. what I’ve seen so far is confusing. Tks in advance. Carlo

    • @aspnano
      @aspnano 4 місяці тому

      Udemy has some good courses on C# and .NET. Check out our blog for coding tutorials on topics like interfaces and dependency injection

  • @jeanariste
    @jeanariste 4 місяці тому

    Is there any plan to have a boilerplate UI with Angular or Blazor?

    • @aspnano
      @aspnano 4 місяці тому

      Hi, thanks for you interest in the boilerplate. At this time, Vue, React and Razor are the UIs we offer. You could get the standalone API though and build a custom UI

  • @muhammadfaryadazim6110
    @muhammadfaryadazim6110 4 місяці тому

    I will just say .... wow 🤟🤟

  • @multistack
    @multistack 4 місяці тому

    Subscribed Bro

  • @mahmoudkhaled8990
    @mahmoudkhaled8990 4 місяці тому

    you saved my work life really bro ty so much

    • @aspnano
      @aspnano 4 місяці тому

      That's what I like to hear 👏

  • @jamalsalman7188
    @jamalsalman7188 5 місяців тому

    Very instructive video! A small tip would be to use SqlConnectionStringBuilder to create the tenant’s connection string

    • @aspnano
      @aspnano 5 місяців тому

      Yes indeed, good suggestion.

  • @user-nw8oi9vn9y
    @user-nw8oi9vn9y 5 місяців тому

    Does this integrate with Azure AD (Entra ID) tenants?

  • @kumaravelg2348
    @kumaravelg2348 5 місяців тому

    Excellent Tutorial😊

  • @PreethamM-di9qk
    @PreethamM-di9qk 5 місяців тому

    Thank you soo much for the awesome video about Multi-Tenant. Clear and crisp explanation. Loved it!

    • @aspnano
      @aspnano 4 місяці тому

      Thanks everyone for learning from these videos! Your comments and feedback are very appreciated

  • @learndotnetcore
    @learndotnetcore 6 місяців тому

    Deep dive tutorial 🎉 thanks efforts dude

  • @larsp5109
    @larsp5109 7 місяців тому

    6:21 SQLServer is way slower working with a string as a primary key instead of an int.

  • @umairmalpara9208
    @umairmalpara9208 8 місяців тому

    This is good. But it can be hectic if we have lots of tenants. Can we extend this example to store tenant data in different schemas of the same database? And How?

    • @logantcooper6
      @logantcooper6 7 місяців тому

      You would have to create a copy of every table required for your application for every new schema and be able to generate the schema/tables dynamically. That would be even more hectic.

  • @bolajibello8917
    @bolajibello8917 8 місяців тому

    Awesome content.. Thanks man!💯

  • @joga_bonito_aro
    @joga_bonito_aro 9 місяців тому

    ngl... that second DBContext feels like a hack.

  • @brankogojkovic8600
    @brankogojkovic8600 9 місяців тому

    Awesome, thanks a lot. It would be nice if there was a video for another example as well (Build a Multi-Tenant App With Multiple Databases)

    • @aspnano
      @aspnano 9 місяців тому

      There is a part 2 where multiple databases are covered, I just added the link in the description.

    • @brankogojkovic8600
      @brankogojkovic8600 9 місяців тому

      Thanks a lot. Best regards@@aspnano

  • @ghevisartor6005
    @ghevisartor6005 9 місяців тому

    nice video! how do you prevent another tenant to use the key of someone else? are they supposed to be very difficult to find or is this a non issue?

    • @aspnano
      @aspnano 9 місяців тому

      The only time you would resolve the tenant from a header or subdomain, is in an unauthenticated request like login. Once the user is authenticated and issued a token, the tenant key would always be read from that token (or cookie) which are imposible to modify. So in the tenant resolver middleware, you would first check to see if there is a token present and if so, obtain the tenant value from a claim in that token.

    • @ghevisartor6005
      @ghevisartor6005 9 місяців тому

      @@aspnano you are right, i'm so dumb

  • @nsa-iwillneverhityou
    @nsa-iwillneverhityou 9 місяців тому

    멀티 테넌트에 대한 좋은 접근 방식에 대한 강좌. 좋은 설명입니다.

  • @gga-wh5du
    @gga-wh5du 10 місяців тому

    Thanks for the video 😊

  • @jamyrcarrasco8043
    @jamyrcarrasco8043 10 місяців тому

    NIcee!!! Thanks for the video.

  • @SOYLUISO
    @SOYLUISO 11 місяців тому

    good video, but that part of creating a second db context only for resolving the tenant of the request is pretty ugly to be honest.

  • @FelipeAlmeida-bc9kf
    @FelipeAlmeida-bc9kf 11 місяців тому

    first off all thks a lot for these tutorial... i have just one question: when i tried to POST a new product, an Microsoft.Data.SqlClient.SqlException was thrown saying that it can't insert a NULL value to TenantId Column, on Product table.... Should we add this information ( by claims for example) on Create endpoint/service? i watched your tutorial twice and could not find any diferences on our code... thanks alot!!!!

    • @aspnano
      @aspnano 11 місяців тому

      Hi, hopefully this helps... you need to have a header called tenant and provide a value, otherwise you should get an Invalid Tenant error. Set a breakpoint in the constructor of your applicationdbcontext and see if a TenantId id being set in the currentTenantService - if not your problem is in the middleware or that service. Last place the issue could be is in your SaveChanges override in dbcontext. In the video (I didnt explain this detail) save changes loops over any entity that implements IMustHaveTenant interface. Make sure your product entity is implementing that interface otherwise it wont get included in the save changes process.

    • @FelipeAlmeida-bc9kf
      @FelipeAlmeida-bc9kf 11 місяців тому

      @@aspnano i found where i made a mistake hehehehe... i left a little "break" at saveChanges switch... tks again and waiting for more 😃

    • @johnbhatt
      @johnbhatt Місяць тому

      If anyone still getting this error on .NET Core 8, I found the solution. When we implemented interface IMustHaveTenant on Entity, it automatically added Column in database. When we added TenantId separately, it was confused because it found two column named TenantId. I simply removed TenantId property from entity class and it saved as expected.

  • @LordErnie
    @LordErnie 11 місяців тому

    Here is me, asking myself what the fk is a Tenant. Good vid non the less tho.

  • @billias28
    @billias28 11 місяців тому

    Very nice video !

  • @Tamer_Ali
    @Tamer_Ali Рік тому

    Thanks a lot for the awesome video 👍 waiting to learn more about SaaS and Multi-Tenant.