Skip to main content

Posts

Showing posts with the label Dotnet-Technology

Part - 6 | Asp.Net Core Identity Series[.NET 7] | Facebook Authentication

The main objective of this article is: Implementing Facebook Authentication Install Facebook Authentication NuGet Package: Let's install the required package for Facebook authentication. Visual Studio 2022: Install-Package Microsoft.AspNetCore.Authentication.Facebook -Version 7.0.4 Visual Studio Code: Install-Package Microsoft.AspNetCore.Authentication.Facebook -Version 7.0.4 Register Our App With Facebook: To enable Facebook authentication we have to register our API project with Facebook. So following are Facebook registration steps. (Step 1) Go to the Facebook developer page 'https://developers.facebook.com/apps/'. (Step 2) Go to the 'My Apps' menu and click on the 'Create App' button. (Step 3) In the 'Create An App' section, choose the 'Consumer' option and finally click on the 'Next' button. (Step 4) Enter a name for the 'Add an app name' and click on 'Create app'. (Step 5) On 'Add products to your app

A Small Demo On OData(v8) In .NET 7 API Application

In this article, we are going to implement a sample on OData in .NET7 API application. OData: The OData(Open Data Protocol) is an application-level protocol for interacting with data via the restful interface. OData supports the description of data models, editing, and querying of data according to those models. OData query features are: $select $orderBy $filter $skip $count $expand Sample SQL Table Scripts: Let's run the below sample SQL script to create a table like 'Employee'. Sample SQL Script: Create Table Employee( Id INT IDENTITY(1,1) NOT NULL, FirstName VARCHAR(200) NULL, LastName VARCHAR(200) NULL, Salary Decimal(18,2) NULL, JobRole VARCHAR(50) NULL CONSTRAINT PK_Employee PRIMARY KEY (Id) ) Create .NET7 Web API Application: Let's create the .NET 7 Web API application to accomplish our demo. Here to create .NET 7 application we use IDE's(editors) either Visual Studio 2022 or Visual Studio Code(Using .NET CLI command). In this demo, we are going to use

.NET 7 Web API CRUD Operation Using One-Many Relationship Tables

In this article, we will implement a CRUD Operation in Web API using one-many relationship tables. Web API: Web API is a framework for building HTTP services that can be accessed from any client like browser, mobile devices, and desktop apps. In Simple terminology API(Application Programming Interface) means an interface module that contains a programing function that can be requested via HTTP calls either to fetch or update data for their respective clients. Some of the key characteristics of API: Support HTTP verbs like 'GET', 'POST', 'PUT', 'DELETE', etc. Support default responses like 'XML' and 'JSON'. Also can define custom responses. Supports self-hosting or individual hosting, so that all different kinds of apps can consume it. Authentication and Authorization are easy to implement. SQL Script For One-Many Relationship Tables: For this demo, we are going to create sample tables like 'Customer' & 'CustomerAddresses&

Part-5 | Asp.Net Core Identity Series[.NET 7] | Google Authentication

The main objective of this article is: Implementing Google Authentication Install Google Authentication NuGet Package: Let's install the package required for google authentication. Visual Studio 2022: Install-Package Microsoft.AspNetCore.Authentication.Google -Version 7.0.3 Visual Studio Code: dotnet add package Microsoft.AspNetCore.Authentication.Google --version 7.0.3 Register With Google: We need to register our Razor Page application with Google to enable Google authentication. So following are the registration steps with Google. (Step 1) Go to Google API & Service could console at "https://console.cloud.google.com/projectselector2/apis/dashboard?supportedpurview=project" (Step 2) Click on the 'Create Project' button. (Step 3) Give a project name and then click on the 'Create' button. (Step 4) On creating a project successfully, we can observe it as a selected project in our dashboard like below. (Step 5) Select 'OAuth Consent Screen' l