Awesome work bro! I have one doubt, each tenant has database and also a central database for tenant management, so why we need a TenantId in the Product table?
@jeffersonfelipe647111 сағат бұрын
@aspnano the structure is diferent? is my projetct I don't have theu TenantService and ITenantService, but managenment..
@Julius-NhodoКүн бұрын
Woow, thanks mate, you saved me 100 years of coding. Will definitely try Nano, because of this I have so much faith and trust in Nano. AMAZING!!!
@ahmadalsader104728 күн бұрын
how to Use DB UP for seeding data when you have a multi-tenancy application ?
@aspnano22 күн бұрын
You can use model managed data, or provide your own custom seed data in the method that applies pending migrations to all DBs
@ahmadalsader104728 күн бұрын
is there a Nano template using MediatR ?
@aspnano22 күн бұрын
You can add it if you need it since the code is unopinionated, but MediatR is needless abstraction for most cases.
@andderrАй бұрын
Hey man, where is C# and .NET in depth? I know a bit about .NET, but your level is fascinating, I would like to get there.
@aspnano22 күн бұрын
Udemy has some good .NET courses. The Nano boilerplate is well documented if you want to learn how things are done on a larger scale
@VeNdEtTaTurkeyАй бұрын
This is awesome! Does the boilerplate template exposes a swagger endpoint? and can be nice to provide the sample Postman template as well.
@aspnano21 күн бұрын
It comes with a postman collection of all the endpoints
@sudidav2 ай бұрын
That’s great! Are you planning to add TypeScript support to the Vue.js project?
@aspnanoАй бұрын
Yes we will add that and Blazor at some point
@GBRLMGR2 ай бұрын
At 3:33 How do you tell Visual Studio to show the arrow symbol in the lamba expression and the "different" or "not equal" symbol in the if statement? Looks cool!
@aspnano2 ай бұрын
I think the latest VS just does that automatically
@TheMezanine3 ай бұрын
Thank you so much!!!
@AhmedGamal-it8ru4 ай бұрын
Thanks very much
@jheyssonapazamonasterio21104 ай бұрын
8:24 dotnet ef migrations add Initial
@johnbhatt4 ай бұрын
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
@charlesthompson89384 ай бұрын
Awesome work!
@proveit995 ай бұрын
WoW, amazing!
@oscargarin5 ай бұрын
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.
@caseyspaulding6 ай бұрын
💯Thank you
@CarCan3166 ай бұрын
Great stuff - if we can see how to do this using Identity for the authentication, sign up, etc., if would make this thing AWSOME!
@aspnano6 ай бұрын
Thats done in the Nano boilerplate, check it out!
@csilipo7 ай бұрын
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
@aspnano7 ай бұрын
Udemy has some good courses on C# and .NET. Check out our blog for coding tutorials on topics like interfaces and dependency injection
@jeanariste7 ай бұрын
Is there any plan to have a boilerplate UI with Angular or Blazor?
@aspnano7 ай бұрын
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
@muhammadfaryadazim61107 ай бұрын
I will just say .... wow 🤟🤟
@multistack8 ай бұрын
Subscribed Bro
@mahmoudkhaled89908 ай бұрын
you saved my work life really bro ty so much
@aspnano7 ай бұрын
That's what I like to hear 👏
@jamalsalman71888 ай бұрын
Very instructive video! A small tip would be to use SqlConnectionStringBuilder to create the tenant’s connection string
@aspnano8 ай бұрын
Yes indeed, good suggestion.
@kumaravelg23488 ай бұрын
Excellent Tutorial😊
@PreethamM-di9qk9 ай бұрын
Thank you soo much for the awesome video about Multi-Tenant. Clear and crisp explanation. Loved it!
@aspnano7 ай бұрын
Thanks everyone for learning from these videos! Your comments and feedback are very appreciated
@learndotnetcore10 ай бұрын
Deep dive tutorial 🎉 thanks efforts dude
@larsp510910 ай бұрын
6:21 SQLServer is way slower working with a string as a primary key instead of an int.
@umairmalpara920811 ай бұрын
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?
@logantcooper611 ай бұрын
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 Жыл бұрын
Awesome content.. Thanks man!💯
@brankogojkovic8600 Жыл бұрын
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 Жыл бұрын
There is a part 2 where multiple databases are covered, I just added the link in the description.
@brankogojkovic8600 Жыл бұрын
Thanks a lot. Best regards@@aspnano
@ghevisartor6005 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@aspnano you are right, i'm so dumb
@nsa-iwillneverhityou Жыл бұрын
멀티 테넌트에 대한 좋은 접근 방식에 대한 강좌. 좋은 설명입니다.
@gga-wh5du Жыл бұрын
Thanks for the video 😊
@jamyrcarrasco8043 Жыл бұрын
NIcee!!! Thanks for the video.
@SOYLUISO Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@aspnano i found where i made a mistake hehehehe... i left a little "break" at saveChanges switch... tks again and waiting for more 😃
@johnbhatt4 ай бұрын
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 Жыл бұрын
Here is me, asking myself what the fk is a Tenant. Good vid non the less tho.
@billias28 Жыл бұрын
Very nice video !
@Tamer_Ali Жыл бұрын
Thanks a lot for the awesome video 👍 waiting to learn more about SaaS and Multi-Tenant.