Main Content

Please wait...

Learn ASP.NET Step By Step with Video

Learn ASP.NET Step By Step with Video Watch With Playlist Or Watch with Topic Store data in File With C# Add Data in MS SQL Table with Store procedure By Using ADODOTNET ASP.NET MVC for beginners with Entity Framework ASPDOTNET MVC for beginners with ADO NET CRUD using SQL Helper ....Read More

.NET Preview 5 on Ubuntu 20.04

It has just been a month, Microsoft has released .NET Core 3.1 stating it as LTS (Long Term Support). And, they already are in preview for .NET 5 which is planned to get its debut on November 2020, however it is not going to be LTS, that is, it won’t be considered as final or stable version. .NET 5 aims to improve in various ways. Building the product on a single code base and producing a single .NET framework that have uniform runtime behavior. Here , I am going to show you how can you ....Read More
As we know ASP.NET Core project needs to published to run in production and we have different types of publishing models, but with the Self-Contained Deployment model, we can reduce the size of libraries with .NET core 3.0 SDK. Many times our project do not need all the things that come with default publishing, so with "PublishTrimmed" options, we can reduce size which just removes unused assemblies in our project. This can be done either with our Project property or with the setup of the publi ....Read More
ASP.NET Core Data Protection using IDataProtectionProvider With Example Find this Demo on Github This Process is easier for developers to use solid Cryptographic algorithm to make safe their data in the case you need to encrypt/decrypt your data frequently. With this, If you need to encrypt data, simply pass the data into the protect method. If you need to access the data again, pass the encrypted data into the Unprotect method, and it will be converted back into plaintext. By defa ....Read More
Routing in ASP.NET core 3.0 and What does it means Endpoint Routing? Routing in ASP.NET Core 3.0 Routing is the process of matching incoming path URL and corresponding to the action’s method in an application. Routes are described in applications and configured in Startup while starting app. A Route can extract the values form URL from the request and values can be used for processing request. By using routing information form applications, routing will be able to generate URL that ma ....Read More

Get file size in bytes in C# using the FileInfo.Length property

Get File Size in C#. How to get a file size in bytes using C# using the FileInfo.Length property. The size of any file in bytes can be returned by the Length property of FileInfo Class. Following code returns the size of file: // To Get size of any file long FileSize = MyFile.Length; Console.WriteLine("File Size in Bytes: {0}", FileSize); Here, to run it we must import System.IO and System.Text namespaces in the project. Coding Implementation Here is the complete coding impl ....Read More
Here I am a going to explains how to send mobile notifications from Firebase using ASP.NET CORE 3.0 with Firebase Admin SDK. Follow the steps: Step 1: Add the FirebaseAdmin package by NuGet. Step 2: Get a Firebase service account key from Project Setting -> Service account -> Click on generate new private key. Step 3: Initialize the FirebaseAdmin SDK from Startup.cs public IServiceProvider ConfigureServices(IServiceCollection services) var googleCredential = _hostingEnvironment. ....Read More

C# Tuple and its use

C# tuple is a data structure Which contains a sequence of elements of different data types. Tuples were available before C# 7.0, but they were unproductive and had no language support. C# 7.0 introduces better tuples feature that enables semantic names for the fields of a tuple using new, more efficient tuple types. C# 7 introduced ValueTuple to reduce the limitations of Tuple and it is more easier to work with Tuple. Syntax Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> an example below ....Read More

ASP.NET CORE - Blazor CRUD operation using ADO.NET

ASP.NET CORE - Blazor CRUD operation using ADO.NET You can find this Demo on github In this article, we are going to create a web application using Blazor with the help of ADO.NET. Here we are going to discuss about how to perform the Create, Read, Update and Delete also called CRUD operations in Blazor with ADO.NET.We will be creating a sample Customer Record Management System and perform CRUD using Blazor on it. Prerequisites: Install the .NET Core 2.1 or above SDK Install Visua ....Read More
Here we are going to build ASP.NET CORE 3.0 Web Application which will helps us to export C# list into CSV (Comma Separated Values). Let’s get started by creating New .net core web application. Now, add a new class called “ExportCSV.cs” inside controller folder. Open Add New Item Screen through Project name on Context Menu of Controller foder >> Add >> New Item >> Select Class. Name it ExportCSV.cs. Click OK button. Add following on ExportCSV impleme ....Read More