Main Content

Please wait...

.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
More than 800 million of people of the entire world are using social media websites, which clearly influence the society. But what about us? Here we are discussing different ways that social media can change our psychology. 1. SOcial Media’s LIKE A DRUG I Can’t log off? Astonishingly, 5-10% of us (Internet users) cannot control how much time we spend on internet surfing. It is an addiction, as contrasting to a material addiction, our brain scans of these people actually show a ....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
Log Analysis | How Log Analysis work? | Log analysis methods | Purposes of log analysis Introduction Log Analysis is the process of analyzing the data generated by system, software activities stored in the form of log data. Log data include each and every activity done in a system, network, software or hardware. Most of the log are automatically generated in OS and in case of web application log are generated in server as defined by the developer. Log analysis helps in tracking unusual beh ....Read More