- 41
- 80 410
Mohamad Dbouk
Lebanon
เข้าร่วมเมื่อ 8 พ.ค. 2023
Welcome to my TH-cam channel! My name is Mohamad Dbouk, and I'm a software engineer with a passion for cloud technologies, Azure, C#, .Net, and DevOps. With over ten years of experience in the industry, I'm excited to share my knowledge and experiences with you.
On this channel, I'll be sharing tips and tricks on how to build solutions, grow your skills, and navigate the world of software engineering. Whether you're a beginner or an experienced developer, I'm here to help you level up your skills and achieve your goals.
Join me as I share my thoughts and experiences, and let's learn and grow together in this exciting field. Don't forget to subscribe and hit the notification bell to stay up to date with my latest videos. Thanks for tuning in!
On this channel, I'll be sharing tips and tricks on how to build solutions, grow your skills, and navigate the world of software engineering. Whether you're a beginner or an experienced developer, I'm here to help you level up your skills and achieve your goals.
Join me as I share my thoughts and experiences, and let's learn and grow together in this exciting field. Don't forget to subscribe and hit the notification bell to stay up to date with my latest videos. Thanks for tuning in!
Build Audit Logs That Don’t Suck (Like Jira)!
In this video, I’ll show you how to create an audit log system similar to Jira’s history feature. We’ll use SQL triggers, Entity Framework, and Minimal APIs to set up solid history logs for your entities. If you want to track changes efficiently, this guide is for you.
Join my mailing list: mdbouk.com/
Follow me on X: x.com/mhdbouk
Buy me a coffee: buymeacoffee.com/mdbouk
Don’t forget to like, subscribe, and share this video with your fellow developers.
Happy Coding!
Join my mailing list: mdbouk.com/
Follow me on X: x.com/mhdbouk
Buy me a coffee: buymeacoffee.com/mdbouk
Don’t forget to like, subscribe, and share this video with your fellow developers.
Happy Coding!
มุมมอง: 2 703
วีดีโอ
How to Host Your NuGet Packages Locally | The Easy Way
มุมมอง 3912 หลายเดือนก่อน
Waiting for a NuGet package to be released and deployed can be frustrating. It’s helpful to have a way to test the package locally before pushing it online. In this video, I’ll show you how to set up a Local NuGet Source Chapters: 00:00 Intro 00:24 AutoBuilder 02:06 How To NuGet 05:39 Push And Test 08:45 Outro Join my mailing list: mdbouk.com/ Follow me on X: x.com/mhdbouk Buy me a coffee: buym...
This Is Why Custom Tenants in .NET are Amazing
มุมมอง 9252 หลายเดือนก่อน
Implementing custom tenant services shouldn't be a headache. It's actually quite straightforward to achieve in your multitenant application. In this video, I’ll guide you through the process of registering and resolving services based on tenant settings, making it easy to manage different tenant requirements without any issues. Chapters: 00:00 Intro 00:29 Support Multitenant 02:42 Resolve Tenan...
The Right Way to Handle Multitenant Background Tasks in .NET
มุมมอง 1K2 หลายเดือนก่อน
In this video, I will show you how to create and manage multitenant background services in .NET. We'll cover best practices and techniques to optimize your services, ensuring they run efficiently and effectively. Chapters: 00:00 Intro 00:34 Code Overview & Tenant Provider 01:35 Create Multitenant Background Service 04:34 Multitenant Actions 10:08 Parallel Execution 13:42 Refactor Multitenant Se...
So You Think You Know Redis, RIGHT?
มุมมอง 6533 หลายเดือนก่อน
Hi there, did you know that you can do so much more than just caching in Redis? In this video, I will show you how to use the Pub/Sub (Publish/Subscribe) pattern using Redis Channels Chapters 00:00 Intro 00:15 Code Overview 01:01 Add Redis Configuration 02:53 Publish a Message 04:32 Subscribe to the Message 06:18 Send UserCreated object 08:06 Outro Join my mailing list: mdbouk.com/ Follow me on...
Building Games with Blazor: Insights and Tips from My Journey
มุมมอง 2753 หลายเดือนก่อน
Had a fantastic time chatting with Nick Cosentino (@DevLeader ) about my journey in software engineering and showcasing my Blazor game! 🎮 👾 Make sure to follow Nick for amazing content as well! Join my mailing list: mdbouk.com/ Follow me on X: x.com/mhdbouk Buy me a coffee: buymeacoffee.com/mdbouk Don’t forget to like, subscribe, and share this video with your fellow developers. Happy Coding!
Why Multitenant Configuration Is A Nightmare
มุมมอง 1.3K4 หลายเดือนก่อน
Built a Multitenant application but facing challenges with tenant-specific settings? Need to register new tenants effortlessly or manage multiple tenant databases within a single app? In this video, I'll guide you through solving these common problems using Azure App Configuration Store. Chapters 00:00 Intro 00:20 Multitenant Code Overview 02:30 Tenant-Specific Configuration 07:04 Different Ten...
.NET Feature Flags with Azure: Everything You Need to Know
มุมมอง 7625 หลายเดือนก่อน
Feature flags, also known as feature toggles, are very powerful tools that allow you to control multiple features in your software during runtime Join me in this video to learn more about configuring feature flags in your .NET application, and how to use Azure App Configuration Store to manage your settings and control your features. CHAPTERS 00:00 Intro 00:28 Azure App Configuration Store 08:0...
Transform Your Testing with Testcontainers: A Happy Developer’s Guide
มุมมอง 3955 หลายเดือนก่อน
Transform Your Testing with Testcontainers: A Happy Developer’s Guide
Meet NSubstitute: The Best Way to Write Unit Tests
มุมมอง 8205 หลายเดือนก่อน
Meet NSubstitute: The Best Way to Write Unit Tests
.NET Background Services: Everything You Need To Know
มุมมอง 8586 หลายเดือนก่อน
.NET Background Services: Everything You Need To Know
Building APIs with Minimal APIs is EASY
มุมมอง 1.1K7 หลายเดือนก่อน
Building APIs with Minimal APIs is EASY
We’ve Been Using HttpClient Wrong The Whole Time
มุมมอง 1.7K7 หลายเดือนก่อน
We’ve Been Using HttpClient Wrong The Whole Time
DbUp: The Best Way To Build Databases In .NET
มุมมอง 2.6K8 หลายเดือนก่อน
DbUp: The Best Way To Build Databases In .NET
Can You Create a .NET Custom Project Template?
มุมมอง 1.2K8 หลายเดือนก่อน
Can You Create a .NET Custom Project Template?
How to Organize Your .NET Minimal APIs with Source Generator
มุมมอง 10K8 หลายเดือนก่อน
How to Organize Your .NET Minimal APIs with Source Generator
How to Publish a .NET Package to Nuget.org
มุมมอง 6818 หลายเดือนก่อน
How to Publish a .NET Package to Nuget.org
Is Your .NET App Multi-Tenant Yet? Learn How!
มุมมอง 11K9 หลายเดือนก่อน
Is Your .NET App Multi-Tenant Yet? Learn How!
Secure your .NET application with Azure Key Vault
มุมมอง 2.7K9 หลายเดือนก่อน
Secure your .NET application with Azure Key Vault
How To Not Break The Single Responsibility Principle!
มุมมอง 4559 หลายเดือนก่อน
How To Not Break The Single Responsibility Principle!
How to apply the DRY principle in .NET, the easy way
มุมมอง 1.8K9 หลายเดือนก่อน
How to apply the DRY principle in .NET, the easy way
Mapperly - .NET object mapping like a boss
มุมมอง 12K10 หลายเดือนก่อน
Mapperly - .NET object mapping like a boss
Running Integration Tests with Docker in .NET using Testcontainers
มุมมอง 1.9K10 หลายเดือนก่อน
Running Integration Tests with Docker in .NET using Testcontainers
❤✨✨✨✨✨🎖️ ❤️❤️❤️❤️❤️
Thanks a lot bro 👍, keep going. Looking for more advanced topics like this one
Thanks for the video. Very useful. However, as with other people posting video's on this topic. You all skip the most important part of getting a correctly configured nuget package generated :( It's not just a matter of doing 'dotnet pack' as that doesn't work
Morris Summit
Very clear explanation 👍
Does the CustomSecretManager run every time the reload happens? Or does it only reload if there are changes in the key vault? Great video, by the way!
Amanda Key
Excellent and informative without being an hour long. Love it! ❤
Thank you 🙌
Thanks, keep it up. Your content is great!
Thank you, Azzam! 🙏
The topic is awesome, required in most of the apps. Thanks and keep it up!
Thank you for the feedback Shahnawaz! 🙏
I have been doing a research for the past couple of weeks on this matter, this wouldn't have been better timed; Though I implemeted somethiing like this perfectly with Cosmos DB, this time the requirement came on a project which is using a relational database and entity framework. Thanks for the vid; helped a lot.
Thank you for sharing this, I’m glad I was able to help 🙏
Good video. Since SQL Server 2016, Temporal Tables is another approach to solve this problem.
yep, i would choose this
Interesting approach yeah
Swear word oh no😮
OH DAMN! I didn't see that, stupid auto caption 😅 (And you can f-ire)
what if i have something like CRON expression i would like to run service A and Service B with different timing without using something like Quartz?
In my other video on background services, I showed how to do that with fixed timer, CRON was planned to be part of that video but it got too big for a simple video. Probably I should revisit that in a separate one! Nice one!
This is very helpful.
Thank you 🙏
Very helpful, how about an automated way of incrementing the version?
You can automate versioning with SemVer and commit messages, and set up automation in CI/CD pipelines using feature branches for revision/preview versions. However, manually changing versions following the semantic versioning (major.minor.patch) is important to avoid breaking changes
@@mdbouk any plans for a video on this?
Yes, sounds like a good idea, I will put it in the queue 🙌
what ide is that?
JetBrains Rider
Many thanks. Very clear.
Thank you 🙌
Hi Mohamad, I've a couple of questions: 1. Where is the Journal (that was mentioned in the logs)? Is it a table? What kind of info is kept in there? 2. Does it keep any kind of hash of the script-files besides the file name and applied date? Because there could be a "smart" guy in the team who may update an existing script instead of adding a new one. I wonder how will DbUp handle it.
The Journal is an automatically created SQL table inside your database. It records the name of the file and the time of deployment. As for your ‘smart’ guy, he shouldn’t update existing scripts 😅The best rollback strategy is to roll forward, by creating new script to update what is needed
Wow! It's very handy tool indeed. Thank you! The Inclusion of all the files with the same extension once in a csproj is another thing I've learned today! Really appreciate!
I really appreciate that 🙏 thank you 🫡
Very nice and helpful, thank you Mohamad! Keep it up.
Thank you 🙏 I appreciate it
very interesting video. But it is very annoying to change the version every time a fix is done especially during the dev phase. I tried to make it work W/o changing version and it s complex to deal with nuget cache. maybe because i was using copy instead of dotnet nuget push...
True, pushing the same version won’t overwrite it. Instead, create a ‘dev’ version with a random prefix, e.g., 1.0.1-patch1. You can automate versioning with SemVer and commit messages in CI/CD pipelines. However, manually changing versions using semantic versioning (major.minor.patch) is important to avoid breaking changes
Never ever let the client specify the tenant for the love of sanity.
Absolutely! The client, which could be your web application, should handle tenant resolution through the JWT. In real-life scenarios, you send the tenant in the JWT and perform some validation. If the tenant is changed in the header, you validate that the logged-in user has access to the provided tenant or fall back to the user’s default tenant. For simplicity, I showed it as part of the header, this approach simplifies the process and demonstrates resolving custom services from tenant configurations. I thought I made this clear in the video
@@mdbouk I did understand, but I also think that this type of info should be mentioned in the video. Some junior dev is going to not know about this and just implement as demonstrated.
You are right, I will make sure to cover this in a dedicated video to provide a clearer explanation. Thank you for pointing that out!
Great tutorial.
Glad you liked it! Thanks 🙏
Honestly, there isn't much difference from Moq. When I need to test stuff like you've shown in the video I use real objects and an in-memory version of SQLite. This is much easier and more solid because you don't assume the behavior of the code around the method you are testing. It also means that if some of those dependencies change their logic - you will get notified with failed tests. I use mocks only for something that is not used in the test itself (like dependencies that are not used in the method I'm testing but a constructor requires).
Thank you for your feedback, Scott! Appreciate you sharing your approach. My take on that, it depends on the context and the situation. After all, if we are doing unit tests, we should mock all other dependencies and focus on the test in hand
Not gonna lie, I wish this video was made 2 years ago! I have made a right pigs ear in my code doing multi-tenancy and what you have shown is so much simpler.
Glad you liked it 🙏 hopefully it wasn’t too late 😅
Awesome 👍, waiting for next one
Thanks ✌️
Awesome and great content!
Glad you enjoyed it 🙏
You were right, my productivity is up "87%"😁 . Thanks, great video
😂 I’m glad to hear that!
PLinq does multithreading which is appropriate for CPU operations such as crypto/maths. For IO operations it is easier and more efficient to use Task.WhenAll() with actions.Select() instead.
You are correct. My intention was to showcase PLINQ, but you are right that it might not be ideal for background services. However, PLINQ can still be useful for certain scenarios where you need to handle cancellation and exceptions in a more defined way. Thank you for pointing that out!
@@mdbouk .NET 9 introduces Task.WhenEach() for less straightforward asynchronous cases. Could be an interesting topic for a followup video regarding more indepth discussions regarding async/parallel, async enumerables, etc...
It is indeed an interesting topic. I will wait for .NET 9 to come out before making any videos, just to avoid any future changes 😅
You forgot to dispose the newly created scope
Ouch, you are correct!
why do the actions need to be scoped?
Yeah, I missed saying that! The reason is that you can now inject any scoped service into your action class (efcontext, repository, ..)
Very insightful and interactive discussion
Thanks! Which part of the discussion did you find most insightful?
Nice intro
Thank you 🙏
It is mandatory to pass token from controller to repository, it there any way shorter because i want to use them in repo only ? I found a suggestion that use addScope<CancelationTokenClass>(). It will be injected to repo instead, do you have any suggestion or any solution for this ?
If it is an API request, you can inject IHttpContextAccessor and get the requestAborted cancellationToken. Var cancellationToken = httpContextAccessor?.HttpContext?.RequestAborted ?? CancellationToken.None; But to have more control and flexibility, pass the cancellationToken and manage it accordingly
Informative, I actually didn’t know this was possible. Thank you
Thank you!
First to downvote.
Thanks 👀
First to watch till the end :)
🕺
Yeah - first :)
😁
i feel like im failing to see the use case for this, whenever i would have to make dummy users it was no biggie at all, and to setup a faker you still have to set the types manually ? it would be much better imo to just be able to pass an existing interface into it
Consider this, you are working with unit tests, you create one faker and every time you need a random user you can call the generate. Or: you are working with APIs, your implementation is not yet complete so you want to return some fake (but realistic) users, you create the faker and return one or multiple. The beauty of it is that you configure the faker once and every time you want a new fake instance you generate
Did you try FastEndpoints or any upcoming video about it?
Thanks a lot bro. you awesome 👍
Thank you Tamer! Appreciated 🙏
Hi Md! Can I install it from VS?
I just found it! thank you for your content.
Good to know 😁 it is an interesting package
@mdbouk I emailed you but I haven't heard from you! Did you get my email. Thanks
Strange, I didn’t get that
Thanks a lot for the video..
Nice
Can you create a video that shows how to create a secret key by group, then show how to access the secret key by group in C# ?
Thanks for the feedback! It sounds like a great topic, Let me see what I can do. Stay tuned!
where to get code for UserService.cs
Very well articulated content.
Thank you Joy