Posts

Showing posts from 2019

Contact application - Upgrade Asp.net Core 2.0 to 2.1

Image
In this article, we will look into steps for contact application - upgrade Asp.net Core 2.0 to 2.1, please see my previous articles about how we developed contact application: ContactApplication using ASP.NET Core Web API, Angular 6.0, and Visual Studio CodePart One: In the article, we will set up ASP.NET Core Web API project, and develop the Web API for contact CRUD operations. ContactApplication using ASP.NET Core Web API, Angular 6.0, and Visual Studio CodePart Two: In the article, we will setup Angular 6 within ASP.NET Core Web API Project, and develop the contact form & list component using Angular Material UI that will consume Web API which we have created in Part One. ContactApplication Azure Deployment: In this article, we are going to deploy/host a contact application with Visual Studio code to Azure web apps. Please note:   Previously we have used Asp.net Core 2.0.3 for contact application, now upgrade to Asp.net Core 2.1.5. This is download link for Dot

MySQL - Good Habits

In this article, we are going to learn few good habits that we can consider important aspect while work with MySQL to improve performance & troubleshoot as following below: #1 - Do not use stored procedure & function parameters name same as WHERE clause field name It will be responding with all record of query because MySQL interprets field value as parameter value similar like 1=1. Example: -- Bad    CREATE   PROCEDURE  `getPersonById`( IN  id  INT (10))   BEGIN    -- return all record instead    SELECT  id, name   FROM  person  WHERE  id = id;   END    -- Good    CREATE   PROCEDURE  getPersonById( IN  personId  INT (10))   BEGIN    SELECT  id, name   FROM  person  WHERE  id = personId;   END      #2 - Use same data-type in WHERE clause It will be impact on performance because MySQL hold extra memory to type conversion. Example: -- Bad    SELECT   name   FROM  person  WHERE  id =  '1001' ;   -- Good    SELECT   name   FROM  person  WHERE  id = 1001;  

Chat Application using Angular 8, Asp.net Core 2.2.0, Signal R 1.1.0

Image
In this article, we are going to create a simple chat application using Angular 8, Asp.net Core 2.2.0, Signal R 1.1.0 as shown below: We install above all prerequisite following in our development machine: Prerequisite .Net Core SDK 2.2.0  – download from  here . Nodejs 10.15.3  – download from  here . Angular CLI 8.0  – Install angular command package by executing this command: “ npm install -g @angular/cli@8.0.0 ” Setup Asp.net Core with Signal R Project: open a command prompt and enter create asp.net core web project as below: Install the following NuGet package in our project: Microsoft.AspNetCore.SignalR Microsoft.AspNetCore.SpaServices.Extensions Call SignalR in the “Startup.ConfigureServices” method to add SignalR services: services.AddSignalR();   Create MessageHub Class: SignalR makes real-time client-to-server and server-to-client communications possible and it will call methods to connect clients from a server using Sign