Friday, May 2, 2025
๐งน How to Remove SSR (Server Side Rendering) from an Angular 19 Project
Saturday, March 29, 2025
๐ How to Copy a SQL Server Database Using a .bacpac File (Schema + Data) || Clone DB
#Clone Database
Need to duplicate a full SQL Server database — including tables, views, stored procedures and data — without writing complex scripts?
Let me show you a simple, reliable method: Exporting and Importing a Data-tier Application (.bacpac). It’s perfect for backups, migrations, and creating dev/test clones.
Step 1: Export the Source Database
-
Open SQL Server Management Studio (SSMS).
-
Right-click your source database → Tasks → Export Data-tier Application.
-
Choose "Save to local disk", then pick a file path and name (
YourDatabase.bacpac). -
Click Next through the wizard and generate the
.bacpacfile.
Step 2: Import into Target Server
-
In SSMS, right-click Databases → Import Data-tier Application.
-
Select the
.bacpacfile you exported. -
Give the new database a name.
-
Complete the wizard. ๐ Done!
๐งฉ Diagram
[ Source DB ]
|
| Export as .bacpac
↓
[ YourFile.bacpac ]
|
| Import on Target Server
↓
[ New DB Clone ]
Why Use This?
๐ Migrate databases between environments (dev, staging, prod).
๐ ️ Create dev/test clones without risking production.
๐ฆ Archive snapshots with both schema and data.
Friday, March 14, 2025
Run ai model in python code with ollama
First download and install ollama By this blog:
Tech Journey With Gagan: Run Any AI Model with ollama in windows
1. run this script
Note: this example for mistral ai model please change acording to your model
Declare function
For run
Option 2:
Run Any AI Model with ollama in windows
Steps for install Any model with ollama in local :
1. Download Olama and install
2. open cmd and run "ollama" command to verify that ollama installed or not.
3. Install models
a. find your model and click on it.
b. copy command and paste into terminal
press Enter now your model installed
Note :Later on same command run your model will run automatically this time it is not downloading it just run
How To work python with ollama: Run AI Model with Python
Friday, March 7, 2025
๐ฎCreate Task Scheduler app using AI Agent in just before 2 min ๐ฎ
Steps to create :
1. use Cline Agent extention in vs code.
2. use api of AI models like.
3. Give prompt to Cline.
4. Work automatically give you clean app.
Note: No need to create any file it will do automatically.
๐ GitHub Repository Viewer
Git Hub Repo Link Here
Thursday, March 6, 2025
Building a C# Web API with Onion Architecture, CQRS, MediatR & Quartz.NET CRON Jobs
Introduction
In modern C# applications, clean architecture plays a crucial role in maintaining scalability and maintainability. In this blog, we will build a C# Web API using Onion Architecture, CQRS, MediatR, and Quartz.NET for scheduling background jobs. This guide will walk you through structuring a project with best practices and SOLID principles.
Why Use Onion Architecture?
Onion Architecture provides a clear separation of concerns by organizing the application into different layers:
-
Domain Layer → Contains core business logic and entities
-
Application Layer → Contains CQRS commands, queries, and interfaces
-
Infrastructure Layer → Handles database, repository pattern, and external integrations
-
Presentation Layer (API Layer) → Exposes the application as an API
Tech Stack
-
ASP.NET Core Web API for building RESTful APIs
-
Entity Framework Core for database operations
-
CQRS Pattern for separating read & write operations
-
MediatR for in-memory messaging
-
Quartz.NET for CRON Job scheduling
-
SOLID Principles to make the application scalable
๐ Project Structure
Your project will be structured as follows:
Step 1: Create the Student Model (Domain Layer)Architecture Snippet
๐ Location:
Onion.Domain/Models/Student.csStep 2: Create CQRS Commands & Queries (Application Layer)Model Snippet
✅ Command to Create a Student
๐ Location:
Onion.Application/Features/Students/Commands/CreateStudentCommand.cs✅ Query to Get All StudentsCode Snippet
๐ Location:
Onion.Application/Features/Students/Queries/GetAllStudentsQuery.csCode Snippet
Step 3: Implement Repository (Infrastructure Layer)
๐ Location:
Onion.Infrastructure/Repositories/StudentRepository.csStep 4: Implement CRON Job Using Quartz.NETCode Snippet
๐ Location:
Onion.Infrastructure/Scheduler/CronJobService.csStep 5: Register Everything inCode Snippet
Program.cs(API Layer)๐ Location:
Onion.API/Program.csCode Snippet
Conclusion
By following this guide, you have successfully built a C# Web API with Onion Architecture, CQRS, MediatR, and Quartz.NET CRON Jobs.
This approach ensures:
✅Scalability using Onion Architecture
✅Separation of Concerns (SoC)
✅Background Job Execution with Quartz.NET
✅Better Maintainability with CQRS & MediatR
๐ Download Full Project
Github
๐ฅ "Building a C# Web API with Onion Architecture, CQRS, MediatR & Quartz.NET CRON Jobs Project" ๐
Cover In this:
✅ Onion Architecture ka Overview
✅ CQRS Pattern + MediatR used
✅ Quartz.NET ke sath CRON Jobs
✅ Dependency Injection & SOLID
✅ GitHub :https://github.com/gaganmanakpuria/AddStudentCronJobWithOnionArchitectureWithSOLID
๐ GitHub Repository Viewer
๐ Agentic Framework 1.0 in .NET: The Power Combo of Semantic Kernel + AutoGen
The AI landscape is shifting fast—from simple prompt-response systems to autonomous, decision-making agents . If you're still building b...
-
Sometimes you add Angular SSR using @angular/ssr, but later want to return to a clean client-side app. Here's how to fully remove SSR (S...
-
Step1: Install Python.Runtime in dotnet. Step2: Install Python in local. Step3: Add Script at same directory "hello.py" . ...
-
In C#, both struct and union are used to create value types, but they are different significantly in memory allocation and usage. __________...

