
Learn how microservices in ASP.NET Core overcome monolithic architecture by splitting code into independent services with own databases, insulated logic, and communication over requests and responses.
Explore the drawbacks of monolithic architecture, including code management, team coordination, regression testing, deployment downtime, scalability, and tech stack constraints, and learn how microservices with single responsibility address these issues.
Explore the design principles of microservices, including decomposition, autonomy, restful communication, and horizontal scalability, to achieve agility, resilience, and independent deployment.
Identify critical subdomains in an ecommerce monolith and migrate them as autonomous microservices, starting with products and product search, then orders, users, and payments, communicating via API requests.
Design microservices with the single responsibility principle, autonomy, and loose coupling, ensuring logging, tracing, resilience, and API versioning from the start for scalable architectures.
Learn to build an autonomous users service with registration and login endpoints using ASP.NET Core, PostgreSQL, and clean architecture, featuring dapper, automapper, and fluent validations, with code pushed to GitHub.
learn how to structure a user microservice using clean architecture, with a core business layer, separate infrastructure and API layers, and dependency injection to configure services.
Define and integrate an exception handling middleware via an extension method in the api pipeline to catch errors, log details, and return a json 500 response with type and message.
Define user models for microservices, including an application user entity and DTOs for login and registration, generating GUID user IDs and JWT tokens with a unified authentication response.
Define the users repository interface in the core layer and implement a dummy, async repository in infrastructure to handle addUser and getUserByEmail and password for login.
Designs a users service interface and implementation in the core layer to handle login and registration use cases, using repository methods and authentication response objects.
Develop an authentication controller with register and login endpoints in a Web API, wiring IUsersService for asynchronous operations and returning authentication responses (user ID, email, name).
Test registration and login endpoints with postman, enable https and ssl, fix 415 by sending json, and enable a json string enum converter for model binding.
Learn how to centralize object-to-object mapping with AutoMapper, configure profiles, and use the map method to translate application user to authentication response across core and API projects.
Resolve an AutoMapper error by recognizing that C# records require a parameterless constructor. Add a secondary constructor and use default values to map authentication response from application user.
Implement a Postgres database connection in your .NET microservice using Dapper, replacing a dummy user with real data. Configure the connection string in appsettings.json and explore open-source Postgres advantages.
Explore Dapper, a lightweight .NET ORM that maps query results to C# objects, offering performance gains over Entity Framework Core and enabling manual SQL with Npgsql for PostgreSQL.
Learn how to use dapper to execute non-query sql with executeasync for insert, update, or delete via parameterized queries and an npgsql connection, and cover select statements.
Explore how Dapper executeAsync performs insert, update, and delete with parameterized SQL against Postgres, and how query first or default async retrieves a single row in login workflows.
Learn FluentValidation for .NET by separating validation logic from models, enabling auto validation with fluent-validation.aspnet-core, and auto-registering validators from assembly.
Explore the listing of fluent validation methods, including not null, not empty, maximum and minimum length, between, equal, matches, email, enum checks, and custom must validators.
Master Git's distributed version control with repositories, commits, and a detailed change history, enabling multi-developer collaboration. Learn how GitHub hosts remote repositories, pushes updates, and uses branching.
Create and authorize a GitHub account with Visual Studio, set up a private repo, and perform initial commit, push, and later pull using GUI tools and git Bash.
Enable swagger in the users microservice to document and test API endpoints using swagger UI and the open API specification, including endpoint URLs, http methods, parameters, and responses.
Build and run an Angular client app to access the user service API, enabling login and registration, by downloading from GitHub and configuring environment.ts for port 7186.
Develop the products microservice by building a layered architecture with data access, business logic, and API presentation, creating a blank solution, adding class libraries, and wiring dependencies.
Implement boilerplate for a .NET microservices app by wiring dependency injection for data access and business logic, adding exception handling middleware, configuring program.cs, and enabling fluent validations.
Install and configure MySQL server and MySQL Workbench, set the root password. Create an ecommerce products database with a products table using a GUID primary key.
Develop a product entity and a MySQL DbContext using Entity Framework Core in a database-first approach, configure a products DbSet, and wire use MySQL with the defaultConnection string.
Define a products repository in the ecommerce data access layer via iProductsRepository, offering get all, get by condition (expression), get by condition single, add, update, and delete with async operations.
defines product dtos and service contracts, including add and update requests, product response, and a fixed category enum, aligning service methods with use cases for get, add, update, and delete.
Add fluent validation to product add and update requests by creating validators in business logic layer, enforcing not empty name, category enum, and optional unit price and stock bounds.
Use automapper to map product ad requests to product entities and map products to product responses, add update mappings, and register mappers via dependency injection in the business logic layer.
Implement a product service with CRUD operations, using fluent validation, automapper, and a repository to map add requests to product entities and return product responses.
Implement delete, get, and update product methods using repository checks, fluent validation, and mapper conversions to product response, and expose them via minimal api endpoints.
Define minimal api endpoints for the product microservice using an extension method on IEndpointRouteBuilder, exposing get all products and get product by id with model binding.
Define minimal API endpoints for product management, enabling search by name or category with a GUID constraint, and create, update, and delete operations using fluent validation and 201 created responses.
Test the products API endpoints - part 1 with postman, fix dependency injection and validators, and map database products to product responses via automapper, returning http 200.
Test product endpoints end-to-end, including get by condition and search by name or category, then post, put, and delete with proper responses. Enable json enum binding for minimal api.
Enable Swagger UI to generate interactive API documentation with swagger.json using Swashbuckle for your .NET API, configure endpoints explorer, HTTPS redirection, and CORS to allow an Angular client at localhost:4200.
Shows an Angular client UI for interacting with users and products microservices, running on localhost 4200 with backends at ports 7186 and 7260, including login and product maintenance.
Create a new GitHub repository for the products microservice, configure a Visual Studio gitignore and readme, then push code to main and guide teammates to clone and pull.
Explore how docker containerization streamlines shipping build artifacts across development, testing, and operations, replacing manual dependency setup with images, containers, port mappings, and volumes.
Understand what a hypervisor is, how it creates virtual machines with separate guest operating systems on a shared host, and how Docker containerization addresses virtual machine drawbacks.
Discover how Docker containerization packages an application and its dependencies into an image, and runs multiple lightweight containers on a shared host OS without separate operating systems.
Explore docker containerization: packaging apps into lightweight images that run in isolated, portable containers. Learn how isolation, portability, and scalability enable fast deployments and versioned microservices.
Compare containers and virtual machines, including Docker daemon, highlighting isolation, startup times, resource usage, and deployment speed, with guidance on when to use each and when to adopt combined setups.
Understand how docker images are built from dockerfiles with the from command into layered, read-only base images, then run as containers with a writable runtime layer.
Share docker images with teammates by building, pushing, pulling, and running containers through docker hub, a registry with private and public visibility.
Explore docker architecture and its core components including host, daemon, engine, client, and registry, along with build, push, run, and pull commands.
Install docker for windows and enable WSL to run linux-based images, then use core docker commands like run, ps, build, pull, and push to manage containers and images.
Learn how to design a multi-stage dockerfile for an ASP.NET Core app, using base and build images, copying csproj, restoring packages, and building in release mode.
Demonstrates a multi-stage Dockerfile: build, publish, and final images, using .NET publish and app host false to create a small, framework-dependent final image containing only published files.
Create a Docker image from a Dockerfile and run a container with host-to-container port mapping, using Docker build and Docker run, tagging the image and referencing its path and context.
Create a docker hub account, set up a repository with tags, and push your docker image from local to the hub, enabling others to pull and run it.
Create and tag a docker image for the products microservice, then push it to docker hub using docker push. Manage local and remote tags like v1.0 and latest.
install docker on linux by updating apt-get and installing docker.io on ubuntu 22.04. verify docker is running with systemctl status docker and start the service if needed.
Pull and run a prebuilt ASP.NET core ecommerce products microservice in Docker on Linux, map host port 8080 to container 8080, and test with Postman while noting a MySQL dependency.
Learn how Docker networks enable container communication on a bridge network, connect product microservice with MySQL and PostgreSQL containers, and troubleshoot connection strings.
Configure a MySQL connection string in a .NET microservice by replacing placeholders with environment variables via dependency injection, using docker run -e and default envs for ecommerce products.
Discover how Docker Compose defines and manages multi-container applications with a simple YAML file, replacing long docker run commands and enabling up or down of all services.
Define a docker compose yaml to run two containers, mysql and the products microservice, with environment variables, ports, volumes, and a custom network on the host using Visual Studio Code.
Configure the products microservice in docker-compose YAML using Harsha Microservices image for eCommerce Products Microservice: v1.0, set mysql_host and mysql_password, map port 8080, and connect to the products microservice network.
Learn to use docker compose commands to manage containers, including up, down, stop, start, restart, pause, and unpause, configure volumes, inspect logs, and test with port mapping to 8080.
Configure the users microservice with environment-driven postgres host and password, create a docker image, and integrate it with docker-compose alongside the products service, using a templated connection string.
Create a separate Docker Hub repository for the ecommerce users microservice under Harsha Microservices, build and push its image, configure Kestrel to port 9090, and tag it as v1.0.
Extend docker compose to add a postgres service and a users microservice within a shared ecommerce network, configure environment, volumes, and startup scripts, and test with endpoints.
Master essential Docker and Docker Compose commands to manage containers, enter and inspect them, connect to MySQL and PostgreSQL shells, and test endpoints with Postman.
Build an orders microservice with clean architecture, data access and business logic layers, endpoints, an order mapper, and fluent validation, using MongoDB and .NET 8 in Visual Studio.
Explore NoSQL databases, featuring flexible schema and JSON-like storage, designed for high performance and horizontal scaling in cloud-native apps, with MongoDB and Redis as examples.
Install mongodb.driver and set up a MongoClient with connection pooling in data access layer. Access MongoDatabase and its collections via dependency injection, using environment variables for host and port.
Define order entity models for the orders microservice, using nested order items in a NoSQL MongoDB document. Apply bson string representations and underscore id mapping for readable, queryable data.
Build a MongoDB orders repository with asynchronous CRUD methods (get, get by condition, get single, add, update, delete), wired via dependency injection.
Define six immutable dto records in a new dto folder to support order and order item add and update operations, and to return detailed order responses with item totals.
Define the orders service contract in the business logic layer, implementing IOrdersService methods with order DTOs, including getorders, getorderbycondition, getsingleorderbycondition, addorder, updateorder, and deleteorder, using MongoDB filter definitions.
Implement FluentValidation validators for order DTOs, including OrderAddRequestValidator, OrderItemAddRequestValidator, OrderUpdateRequestValidator, and OrderItemUpdateRequestValidator, with rules for userId, orderDate, orderItems, productId, unitPrice, and quantity, and register them via DI.
create and configure order and order item mappers to convert dto requests to entities and entities to order responses, using auto mapper profiles and dependency injection.
Develops the orders service implementing IOrderService with addOrder and updateOrder for MongoDB persistence. Validate order and order item requests, map to entities, calculate totals, and prepare user microservice checks.
Implement the remaining orders service methods using MongoDB filters and repository calls, mapping results to order responses. Configure dependency injection for the orders service and prep for api controllers.
Implement get endpoints for the orders API, returning all orders or filtering by id, product id, or order date. Use MongoDB filters to fetch matches from order items.
Create post, put, and delete endpoints in the orders microservice, wired to service methods and fluent validation, with routes at api/orders and returning a detailed order response.
Launch a MongoDB docker container for local development, connect with docker exec and the mongo shell, inspect databases, and plan a startup script to create a default orders database.
Create a MongoDB init.js in a local orders db folder and mount it to /docker-entrypoint-init-db.d. Insert sample orders with insertMany into the orders collection and verify via the mongo shell.
Test the orders microservice endpoints using Postman and Swagger, ensure underscore id initialization for orders and items, and explore RESTful updates, deletes, and product/user validation via HTTP client.
Compare synchronous brokerless and asynchronous brokered microservice communication, using direct HTTP or gRPC requests and messaging tools like RabbitMQ, Kafka, and Azure Service Bus, with producer–consumer patterns.
Create an asynchronous getUserByUserId endpoint in the users microservice to fetch user data by userId, map it to a user DTO with userId, email, personName and gender.
Develop a custom http client to call the users microservice from the orders microservice, invoking get user by user id and returning the user dto via read from json async.
Use a custom http client added with addHttpClient to call the users microservice's getUserByUserId, configure base address via environment variables, and validate user IDs in orders service.
Validate product ids in the order add flow by querying the products microservice GetProductByProductID endpoint and return not found if absent, otherwise ok.
Learn to run and debug multiple microservices in Visual Studio using Docker Compose, wiring in existing images, environment variables, and port mappings for integrated development.
Extend Docker compose in Visual Studio by adding a MongoDB container with init.js startup script, volume mapping to docker-entrypoint-init-db.d, and a shared network for the orders service.
Extend a docker-compose setup in Visual Studio to add orders, users, and products microservices using existing images. Configure ports, environments, networks, and MySQL and Postgres databases with startup scripts.
Debug microservices in Visual Studio by validating Docker Compose port mappings and container names to ensure reliable inter-service calls and correct database connectivity.
Validate the product id by calling the products microservice from the orders service with a product dto and a dedicated http client, noting docker compose setup and per-item request performance.
Implement loading of product name and category for order items. Create a product dto to order item response mapper and reuse product data across get, add, and update order methods.
Implement a mapper to enrich order responses with user person name and email by loading data from the users microservice for each order.
Connect your orders microservice to a front-end Angular application and configure environment ports. Run npm install and ng serve to launch the ui, then verify login, cart, and place orders.
Explore fault tolerance in the orders microservice, where dependency and dependent services may fail, and learn to implement graceful degradation, fallbacks, and circuit breakers with Polly.
Explore Polly, the popular .NET fault-tolerance library for ASP.NET Core microservices, including retries, timeouts, circuit breakers, and global policy application.
Explore the Polly retry policy to automatically reissue failed requests between microservices, using a scenario where service A calls B, handles transient errors, and applies a retry limit.
Demonstrate a centralized wait and retry policy for the users microservice using polly, with five retries and a two-second delay to handle transient errors.
Centralize Polly policies by moving retry and other policies from program.cs into a dedicated service that implements IAsyncPolicy, enabling reusable HTTP client policies and clearer logs.
Explore exponential backoff as a robust retry strategy to prevent port exhaustion by staggering retries—avoiding fixed delays and spreading requests with increasing delays.
Explore fault data as a fallback after failed retries, returning a fixed data transfer object with dummy values instead of exceptions to keep clients informed of temporary unavailability.
Explore how circuit breakers protect ASP.NET Core microservice communications using Polly, outlining closed, open, and half-open states, thresholds, and recovery with retries.
Catch the brokenCircuitException from the circuit breaker, log the exception details, and return dummy fault data to the client when the circuit is open.
Polly's fallback policy to supply default or fault data when a dependent service fails, by creating a dedicated fallback for the products microservice and returning a safe HTTP response.
Implement and apply a timeout policy to cap response wait time, triggering a timeout exception after 1500 milliseconds, with fallback and retry strategies demonstrated.
Catch TimeoutRejectedException in microservices clients, log errors, and return dummy data, while using circuit breaker and fallback policies to handle timeouts.
Explain bulkhead isolation in Polly, limit concurrent requests per workload to prevent dependency overload, and implement fallback and logging in a microservice to handle high traffic.
Learn to create a combined policy by wrapping iAsyncPolicy components—retry, circuit breaker, and timeout—into an AsyncPolicyWrapType for consistent execution order like a pipeline.
Apply reusable, parameterized Polly fault-tolerance policies (retry, circuit breaker, timeout) to .NET microservices, wire through dependency injection, and enable consistent resilience across services.
Understand why microservices fetch product data via cache instead of repeated requests, and compare in-process memory, centralized caching with Redis, and distributed caching with a cache cluster.
Demonstrates using the Redis docker image to enable caching in .NET microservices. It covers integration, port mapping, and persisting cache data to speed up get operations for products and users.
Install stackexchange.redis and microsoft.extensions.caching.stackexchange.redis to use a high-level Redis cache with the iDistributedCache interface, and configure environment variables, docker-compose, and dependency injection for Redis.
Learn how to read from Redis cache using iDistributedCache, keying with product:<id>, deserialize cached JSON into a product DTO, and fall back to the product microservice when the cache misses.
Serialize product objects to JSON and store them in the distributed cache with keys like product:<id> using set string async, applying absolute and sliding expiration to manage cache lifetime.
Fix a caching bug by ensuring the product data from the api is cached, not the fallback data; detect 503 service unavailable responses and bypass caching of fallback content.
Inject iDistributedCache and cache user data as JSON with a key like user:<id>, then retrieve from cache first before calling the service, using 5-minute absolute expiration and 3-minute sliding expiration.
Explore the concept and benefits of an API gateway, showing how to implement it with ocelot to centralize communication between clients and microservices and enable cross-cutting concerns.
Explore how to implement an API gateway in ASP.NET Core using the Ocelot NuGet package, configure ocelot.json, and wire up use Ocelot middleware to route requests.
Configure the api gateway with ocelot.json to map upstream routes to downstream microservices using a base url and upstream and downstream path templates, including http methods and options requests.
Learn to wire an API gateway into docker-compose by building the gateway image, exposing port 8080, and configuring routes via ocelot.json for gateway/orders.
Configure ocelot.json routes to forward gateway requests to orders, products, and users microservices, and ensure upstream and downstream path templates match while enabling swagger endpoints.
Learn how to route microservice communication through an API gateway to decouple services, replacing direct calls with gateway-forwarded requests to products and users.
Align the angular front-end with the api gateway by routing to downstream microservices and testing login and register via gateway endpoints using the configured gateway url.
Enable Polly policies in Ocelot by integrating the Polly provider and configuring circuit breaker, timeout, and retry in ocelot.json via QoS options for the gateway/products route.
Learn to implement rate limiting with Ocelot, enforcing a fixed number of requests per time window and returning 429 for excess traffic. Configure limits, period, and optional client bypass lists.
Enable response caching in the api gateway with Ocelot by configuring file cache options and a 30-second ttl. Cache the full orders response for subsequent requests.
Ready to master microservices and cloud-native development with a hands-on, practical approach?
Dive into our course, ".NET Microservices with Azure DevOps & AKS | Basic to Master," where we build a robust eCommerce application from the ground up, utilizing ASP.NET Core and the Azure ecosystem.
Top Reasons to Enroll
Practical Learning: Engage in a real-world eCommerce project that ties together every concept, ensuring you learn how to apply your knowledge practically.
In-Depth Coverage: From Docker and Kubernetes to RabbitMQ and Redis, this course provides comprehensive training in essential technologies for microservices.
Industry-Relevant Skills: Develop marketable skills that are in high demand across the tech industry. The course includes practical tests, assignments, and real-world scenarios.
Interview Preparation: Each section is equipped with interview questions to help you gauge your understanding and prepare for real-life interviews.
Software to be installed:
This course requires you to download "Docker Desktop" from "www. docker .com". If you are a Udemy Business user, please check with your employer before downloading software.
What Will You Gain from This Course?
Hands-On Experience: Build a complete eCommerce application and gain real-world experience in microservices development. Each concept is tied to practical tasks, helping you understand how to apply your knowledge effectively.
Comprehensive Knowledge: Master key technologies and practices including Docker, Kubernetes, RabbitMQ, Redis, Azure DevOps, and more. This broad coverage ensures you are well-versed in modern development and deployment practices.
Practical Skills: Engage in assignments and practical tests designed to solidify your learning and prepare you for industry challenges. You’ll develop skills that are directly applicable in the real world.
Interview Readiness: Prepare for job interviews with real-world interview questions and answers, testing your knowledge and boosting your confidence.
Industry-Ready Expertise: Learn to build and deploy containerized microservices with DevOps integration, a highly sought-after skill set in today’s job market.
What Will You Learn?
Complete eCommerce Project: Build a fully functional eCommerce platform featuring users, products, and orders microservices. Learn to implement and integrate these using ASP.NET Core Web API and various technologies.
Microservices Architecture: Develop expertise in microservices with diverse databases like Postgres, MySQL, and MongoDB, along with different architectural patterns.
Containerization & Orchestration: Master Docker and Kubernetes. Learn how to containerize your applications, orchestrate them with AKS (Azure Kubernetes Service), and achieve zero downtime deployments.
Fault Tolerance & Caching: Implement Polly for advanced fault tolerance strategies, use Redis for caching, and leverage RabbitMQ for reliable messaging.
DevOps Integration: Gain hands-on experience with Azure DevOps. Set up CI/CD pipelines, manage environments, and integrate with Azure Key Vault for secure deployment.
API Management & Authentication: Configure an API Gateway using Ocelot, manage your APIs with Azure API Management, and secure your application with Microsoft Entra ID B2C authentication.
What Will You Build?
You’ll develop a complete eCommerce application featuring:
Users Microservice: Manage user data with a clean architecture and tools like AutoMapper and FluentValidation.
Products Microservice: Handle product information with a minimal API and integrate MySQL and EF Core.
Orders Microservice: Process orders using MongoDB and minimal APIs with a focus on fault tolerance and resilience.
Frontend Integration: Connect your microservices with a pre-built Angular frontend, demonstrating end-to-end functionality.
FAQs:
Do I need prior experience?
Not required, but knowledge of ASP .NET Core, C#, HTML, CSS, JS, and basic knowledge of Angular is needed.
Is this course suitable for beginners?
Yes, the course is designed to be accessible to both beginners and those with some experience in ASP.NET Core and related technologies.
Is full Angular knowledge necessary?
No, the course includes a ready-made Angular frontend. You’ll focus on backend development, and the Angular source code is provided. The enough knowledge just to run existing Angular app is sufficient.
What if I face challenges?
Access detailed explanations and practical assignments to overcome obstacles. Additional support is available through course notes.
What sets this course apart?
This course offers a complete, practical project with advanced technologies and Azure DevOps practices and AKS integration, providing a thorough and hands-on learning experience.
What if I get stuck while learning?
You can drop a question in the Q&A, and the instructor or the teaching assistant will answer your questions within 24-hours - max within 48-hours.
How long will it take to complete the course?
The course has about 39 hours of video content. Learning for one hour daily would take approximately 35 days to complete.
What if I don’t like the course?
That will likely not happen. But, if it does, you are covered by the Udemy 30-day money-back guarantee, so you can quickly return the course. No questions asked.
This course is offered by Web Academy by Harsha Vardhan. Any watermark stating "Harsha Web University" is from our old branding and does not represent an academic institution. This course is for educational purposes only and is not affiliated with any university or degree-granting institution.