Monday, January 20, 2025

Refreshing/Clean a Database with SQL and Entity Framework

Quick steps to refresh your database: 1. Drop All Tables
Run the following SQL script to drop all existing tables:

Code Snippet

Note: when you try above than you got some errors but don't its because of relationship execute multiple times. 2. Recreate EF Migration Table Recreate the EF migration table with this script:

Code Snippet

3. Update the Database Run the following command to reapply migrations and update the schema: update-database These steps ensure a clean database reset while maintaining EF migration compatibility.

Monday, January 13, 2025

Send Emails Through SendGrid using DotNet

This tutorial guides you through building an email notification system in ASP.NET Core using SendGrid. We’ll cover user registration, OTP email verification, and templated email functionality with best practices.

Step 1: Setting Up SendGrid

Follow this guide to set up your SendGrid account, obtain the API key, and configure it for email delivery.

Step 2: Email Message Structure

The `EmailMessage` class encapsulates the data required for sending emails:

Code Snippet

Step 3: Email Settings

The `EmailSettings` class manages configuration values for SendGrid:

Code Snippet

Step 4: SendGrid Email Service

The `SendGridEmailService` handles email sending using SendGrid’s API:

Code Snippet

Step 5: Email Template

Create an HTML email template for OTP delivery:

Code Snippet

Step 6: User Registration Workflow

Implement user registration with OTP email verification:

Code Snippet

Step 7: Configuring Program.cs

Set up services and middleware in the `Program.cs` file:

Code Snippet

Copy Code Functionality

Include the following JavaScript in your blog to enable the one-click copy functionality:

Code Snippet

How To Setup SendGrid Account

Step 1 : Do SignUp on SendGrid Website and Create Sender Identity As per shown in Screenshots.













Step 2 : Create API Just Click on API Key than click on Full Success.

Step 3 : Copy the API Key Because Its not Show Again.





Thankyou.......🤗


Friday, January 10, 2025

How to Run Python in .NET: A Step-by-Step Guide for Developers

Step1: Install Python.Runtime in dotnet.

Step2: Install Python in local.

Step3: Add Script at same directory "hello.py".

Code Snippet

Step4: Copy Code For Run Script. and Paste into Controller.

Code Snippet



Now you can Enjoy with Python in DotNet😉

Monday, January 6, 2025

How to open Blob Files in New Tab using dot net and angular

Step 1: Add This code to Angular app

Angular code

Html Side Code

HTML Code



Step 2: Add DotNet Code To Download blob File.

Dot Net Code



Note: use this in your api service

Saturday, January 4, 2025

How to Add Image Slider in Blogger


Login ==> Create New Post ==> Click On < > ==> Click HTML View ==> Copy and Paste Below


For images Link => just normally upload files and copy links and replace with href For Add Slider 
Note: After Take Link remove that.

Add In Post

Go To Theme ==> Click Customize Drop Down ==> Click Edit HTML ==> Add Below Code Before Body Closing Tag

CSS And JavaScript Code

Note: Some Time It is not working properly because of html parser than you need to first convert html parser code than put in textarea.

Friday, January 3, 2025

How to hide navbar and footer of blogger


navbar (showing at top):


Footer:  


Here I am trying to hide using below steps:

Go To Theme ==> Click Customize Drop Down ==> Click Edit HTML ==> Add Below Css Code

Code Snippet

Wednesday, January 1, 2025

How to add input box with copy to Clipboard Functionality in Blogger

Login ==> Create New Post ==> Click On < > ==> Click HTML View ==> Copy and Paste Below

For Title Change => Code Snippet
For Input Add Content in TextArea Tag

Add In Post

Go To Theme ==> Click Customize Drop Down ==> Click Edit HTML ==> Add Below Code Before Body Closing Tag

CSS And JavaScript Code

Note: Some Time It is not working properly because of html parser than you need to first convert html parser code than put in textarea.

How to Do Cross-Browser Testing on Windows — Including Safari via Playwright

To test follow few steps: Step 1. Install node Step 2. create Folder and run these commands commands Copy Code ...