<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bhagya Mangale on Medium]]></title>
        <description><![CDATA[Stories by Bhagya Mangale on Medium]]></description>
        <link>https://medium.com/@bhagyamangale?source=rss-6d2a0609e839------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Mp1AzMICZ_F61rjNxPWRIw.jpeg</url>
            <title>Stories by Bhagya Mangale on Medium</title>
            <link>https://medium.com/@bhagyamangale?source=rss-6d2a0609e839------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:40:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhagyamangale/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Session and Cookies in MVC Core]]></title>
            <link>https://medium.com/@bhagyamangale/session-and-cookies-in-mvc-core-4f8ef9d73a9c?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f8ef9d73a9c</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Mon, 01 Jun 2020 19:26:21 GMT</pubDate>
            <atom:updated>2020-06-01T19:26:21.069Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HAVxamTTpXSvSoJn6fCM7g.jpeg" /></figure><p>Hello…!! In this article, we are going to see what is HTTP stateless protocol, Session and Cookie, and how it works. So let’s begin.</p><p><strong>*First we discuss HTTP Protocol</strong></p><ul><li>Http protocol is a stateless protocol, which means when we send an HTTP request to the server it creates a memory for that request and sends a response and erases that memory.</li><li>And when the next request comes then it create again a new memory and after the response, it will erase it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*cwCFtT0Fi4hDOYnwxZ2hzA.jpeg" /><figcaption>HTTP Stateless Protocol Diagram</figcaption></figure><ul><li>This is how the HTTP Stateless Protocol works.</li><li>So to make HTTP Protocol Stateful we have to use the ‘Session’ variable, Session helps to make HTTP Protocol Stateful.</li><li>When we use the session variable in our application then, if we send a request to the server to increment the value of ‘i’ by 1, that value will store into the session variable and then the server throws the response.</li><li>A session does not store the value on the server, it tells the browser to store that value on it’s any file, then the browser takes that value from a session and stores that value in a cookie.</li><li>Before taking that value from a session browser Encrypted that value.</li><li>Now when we send another request to the server that time the browser sends the information of cookie to the server and the value of ‘i’ will automatically populate and the response is sent, and again browser will store the value in a cookie.</li><li>Again when the end-user sends the request that time this process will repeat.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*WVa7fawmbealajblfT2rlg.jpeg" /><figcaption>HTTP Stateful Protocol Diagram</figcaption></figure><blockquote><strong>*So, this is how the session and cookie works, let’s see one demo.</strong></blockquote><ul><li>First, in the HomeController, we have to set a session variable. I’m going to set the session variable in the Index view.</li></ul><pre>public IActionResult Index()<br>        {<br>            int y = Convert.ToInt32(HttpContext.Session.GetInt32(&quot;valueofx&quot;));<br>            if(y == null)<br>            {<br>                x = 0;<br>            }<br>            else<br>            {<br>                x = y;<br>                x++;<br>            }</pre><pre>HttpContext.Session.SetInt32(&quot;valueofx&quot;, x);<br>            return Content(x.ToString());<br>        }</pre><ul><li>To enable cookie first we have to go into the Startup.cs file, in the ConfigureServices, add service and create a cookie (name it whatever you want)here I have given name is ‘sgmcookie’.</li></ul><pre>services.AddSession(options =&gt;<br>            {<br>                options.Cookie.Name = &quot;.sgmcookie&quot;;<br>                options.IdleTimeout = TimeSpan.FromMinutes(2);<br>                options.Cookie.IsEssential = true;<br>            });</pre><ul><li>It is necessary to enable the cookie if we don’t do this then the session variables will not be enabled.</li><li>When we add service in the ConfigureServices then we should Configure that service in the Configure method,</li></ul><pre>app.UseSession();</pre><ul><li>Otherwise, it will show us an error i.e.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kY6xu4i6Sj6FRhJlGR2eMw.jpeg" /><figcaption>Error Message window</figcaption></figure><ul><li>Now let’s see the actual execution</li><li>First I have put a debug point in HomeController.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*IagfQmd0M-pznSSCWnRrgQ.jpeg" /><figcaption>HomeController Debug Point</figcaption></figure><ul><li>Now the application is running, and we can see the debug point is invoked.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*YVl7V40Ob9mPmwXGr8GPVQ.jpeg" /><figcaption>Invoked debug point of HomeController</figcaption></figure><ul><li>We can see when we do ‘Step over to debug point’ it will run the code step by step and the value of ‘x’ is increased by 1.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*-IEosBmOov7k9QtYAh350A.jpeg" /><figcaption>First Output</figcaption></figure><ul><li>Now we’ll see how the value is increased when we refresh the page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UM2YAmDSUB4uzKwYeKxFxg.png" /><figcaption>Reloading Output</figcaption></figure><ul><li>When we refresh the page the debug point is again invoked, and we do again ‘Step over’.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*FnhCmC0JOLBSNA2_Mun_YA.jpeg" /><figcaption>After Reloading the page</figcaption></figure><ul><li>We can see in the above window the previous value is stored at ‘y’ variable, and the value of ‘y’ variable is added with the increased value of ‘x’ and that the value is stored in ‘x’ variable.</li><li>And the output is.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*PnB-BgceT2z9hhaDePyh4g.jpeg" /><figcaption>Output After Reloading</figcaption></figure><p><strong>*Now we’ll see what is Cookie and where it is.</strong></p><ul><li>cookies make use of end-user specific information transmitted by the Web server onto the user’s computer/device so that the information might be available for later access by itself or other servers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T75ss94YPwgnNfvBO0jA1g.png" /><figcaption>Developer Tool</figcaption></figure><ul><li>We can see in the developer tool there is an option i.e Application, in an application at the left side menubar there is a cookies option, just go to the cookies option you’ll see no cookies are there.</li><li>When we refresh the page cookies will be there.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G80wV-xR95Ipu52SJ9P-Kw.png" /><figcaption>Cookies (Developer Tool)</figcaption></figure><ul><li>When we click on that cookie we can see below there is a value of that cookie which is in hashed form.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TgwkwZdXONrB528RZlJ-sg.png" /><figcaption>Hashed value of the cookie (Developer Tool)</figcaption></figure><ul><li>We can see in the below window the hashed value of the output is stored into the cookie variable which we have created.</li><li>And when the page reloads that time the hashed value of the output is changed again n again.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zi1b7dko3h_tyUS62-z3lg.png" /><figcaption>The encrypted value stored in the created cookie</figcaption></figure><ul><li>Now If we delete the cookie from the browser then what will happen?</li><li>It will start from the initial.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NmQdRmE1qUi49iT2XZWNZA.png" /><figcaption>Deleting cookie (Developer Tool)</figcaption></figure><ul><li>We have deleted the cookie from the browser and now refresh the page, the output is:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ysuvVtUalHgVTS0Uv7rXlg.png" /><figcaption>Output after deleting cookie(Developer Tool)</figcaption></figure><p>So this is all about the session and Cookies I hope you understand the concept of a session and cookies, for more understanding, do watch following video</p><p>Learn MVC Step By Step Happily :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fipio9ze57X8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dipio9ze57X8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fipio9ze57X8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href">https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href</a></iframe><p><strong>My Previous articles of MVC.</strong></p><ul><li><a href="https://medium.com/@bhagyamangale/overview-of-net-core-6026ddb6675c">Overview of .NET Core</a></li><li><a href="https://medium.com/@bhagyamangale/kestrel-web-server-and-reverse-proxy-in-asp-net-core-ab9a0f027e9">Kestrel Web Server and Reverse Proxy in Asp.net Core…</a></li><li><a href="https://medium.com/@bhagyamangale/bootstrapping-process-of-mvc-core-e847d735ede3">Bootstrapping Process of MVC Core</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f8ef9d73a9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bootstrapping Process of MVC Core]]></title>
            <link>https://medium.com/@bhagyamangale/bootstrapping-process-of-mvc-core-e847d735ede3?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/e847d735ede3</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Sun, 31 May 2020 18:24:16 GMT</pubDate>
            <atom:updated>2020-06-01T08:34:42.474Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*VNryHslnhV5gdQRK0ehSig.jpeg" /></figure><p>Hello…!!In this article, we will see how does bootstrap works in MVC Core. So let’s see…</p><h4>#Bootstrapping Process:</h4><ul><li>When the application loads it first runs the program.cs file.</li><li>Program.cs starts kestrel web server. We have already seen What is kestrel? in my previous article</li></ul><p><a href="https://medium.com/@bhagyamangale/kestrel-web-server-and-reverse-proxy-in-asp-net-core-ab9a0f027e9">Kestrel Web Server and Reverse Proxy in Asp.net Core…</a></p><ul><li>In Startup.cs file below are the 3 methods which run in the listed sequence :</li></ul><ol><li>Constructor</li><li>ConfigureServices</li><li>Configure</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2RlQmPUO3-5TXaLGYhJQA.png" /><figcaption>BootsrapProcess</figcaption></figure><ul><li>First, we’ll see three methods of a startup.cs file.</li></ul><p><strong>1. Constructor</strong></p><ul><li>First the constructor fires of the class.</li><li>In the constructor, we can initialize class variables, do Dependency injection.</li></ul><p><strong>2. ConfigureServices</strong></p><ul><li>After that ConfigureServices method will be executed. In the ConfigureServices, we add services.</li></ul><p><strong>3. Configure</strong></p><ul><li>This is the third method of a startup.cs file this will execute after ConfigureServices.</li><li>In the Configure method, we Configure the services, which has been added in ConfigureServices</li></ul><p><strong>*Let’s see the actual execution of application…</strong></p><ul><li>First, we have to create an MVC Core Project and we’ll understand the Bootstrap process in the MVC Core Application.</li><li>The Bootstrap means it runs 2 files that are program.cs and startup.cs, the program.cs file runs a web server and in a startup.cs it runs whatever services we want.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7R9CgdLzjl3E6yi-a4Q8CA.png" /><figcaption>MVC Application</figcaption></figure><ul><li>As we see in the above window in the Solution Explorer two files are there Program.cs and Startup.cs. After creating the project ‘DotNetCoreApplication’.</li><li>Let’s go into the program.cs file</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lrg7e9hhQdgEnmrOuMvJPA.jpeg" /><figcaption>program.cs file</figcaption></figure><ul><li>In the program.cs file in a class there is a code that switches control to the startup.cs file.</li><li>As we know the startup.cs file has three methods. This file loads the configuration of that application.</li><li>Let’s see three methods of a startup.cs file step by step in Application.</li></ul><p><strong>1. Constructor</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*D1bsWp5YjGutLJ81uRpD1A.png" /><figcaption>Constructor method of Startup.cs</figcaption></figure><ul><li>We can see in the above window in the startup.cs file there is a constructor in which we can add the initialization logic.</li></ul><p><strong>2. ConfigureServices</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*YB5bshLkKLn7EVwJWr900g.png" /><figcaption>ConfigureServices method of Startup.cs</figcaption></figure><ul><li>The above window is of the ConfigureServices method, in this ConfigureServices there are some services.</li><li>If we want to add some other services we can add that in this ConfigureServices method, it helps to add services.</li></ul><p><strong>3. Configure</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*jrEmF9nbYtA89DTdESbjfw.png" /><figcaption>Configure Method of startup.cs</figcaption></figure><ul><li>In this Configure method, we configure the services.</li><li>Which services we have added that is configured here in this method.</li><li>So after this, all our application is fully running and waiting for the end-users request.</li><li>In our application, there is a Controller, View, and Model, so when the end-user sends the request it will go to the Controller and get the response, and the response will pass to the end-user.</li><li>When we run the application the program.cs and startup.cs file runs only one time.</li><li>Now let’s run the application putting some debug points in the program.cs and startup.cs file.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DPYz0q9SomTy0yQ4YBPqJg.jpeg" /><figcaption>Debug point of the program.cs file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W4d2hhwlw-i010BHRphZrA.jpeg" /><figcaption>Debug point of the startup.cs file</figcaption></figure><ul><li>I have added all debug points in the program.cs file and startup.cs file.</li><li>After that, I will run the application using IIS as a Front-end Proxy.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Nf2AbJifW54h03q1_vQAQ.jpeg" /><figcaption>SSL pop-up Message</figcaption></figure><ul><li>And we’ll get one window, which asks to Configure ASP.Net Core SSL then click on yes and Configure the SSL.</li><li>Our application is running.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*szvL1FhTMQxkB6ULgx9xfA.jpeg" /><figcaption>Debugging of the program.cs file</figcaption></figure><ul><li>Now we can see when we run our application the first debug point is in the program.cs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b7l4n4bdIMz7BBKe_2X7zw.jpeg" /><figcaption>Debugging of Constructor method of the startup.cs</figcaption></figure><ul><li>The second debug point is in a startup.cs at the Constructor, when we want to write initialize code then we can write it in this Constructor.</li></ul><p><strong>*NOTE:</strong> A Constructor is not a concept of MVC Core, Constructor is a concept of ‘Object-Oriented Programming’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWXFzDw83YIVRWbQSfG4vg.jpeg" /><figcaption>Debugging the ConfigureServices method of the startup.cs file</figcaption></figure><ul><li>Now see our next debug point is at ConfigureServices, We know what is the role of ConfigureServices it adds the services.</li><li>Now our last debugging point is at Configure.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7g9Lxdm-SBrvMgYZzKfhEw.jpeg" /><figcaption>Debugging the Configure method of the startup.cs</figcaption></figure><ul><li>We know the Configure method configures the services which we have in ConfigureServices.</li><li>Now our application is fully running.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-3pIPOa3Pzvt207LPFinA.png" /><figcaption>Output of Application</figcaption></figure><ul><li>Now we see the Request and Response process in MVC Core Application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5zqH4ti7gPag-BswTnxZDQ.png" /><figcaption>Process of Request and Response</figcaption></figure><ul><li>For testing, we just add a debug point in HomeController at Index view.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8VGGQP93OJSzN6Vggvbw3g.jpeg" /><figcaption>Debug point at HomeController File</figcaption></figure><ul><li>So that when we click on Home that time it hits the HomeController and fires the index view.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2q9V1s7gGd5G9ZiJt98z7Q.png" /><figcaption>Sending Request to Controller (Clicking on Home)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-3pIPOa3Pzvt207LPFinA.png" /><figcaption>the Response of the controller (Output)</figcaption></figure><ul><li>The Response is the same page because we click on Home so that its response to us a home page (Index view).</li><li>Likewise when we click on any page that time it hits the HomeController and fires that page view.</li><li>This is how the Controller takes the Request from the End-User and passes the Response.</li></ul><p>So in this article, we have seen how the Bootstrap process and Request-Response process is done in MVC Core Application and for more understanding watch the following video.</p><p>Learn MVC Step By Step Happily :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fipio9ze57X8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dipio9ze57X8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fipio9ze57X8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href">https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href</a></iframe><p><strong>My Previous articles of MVC.</strong></p><ul><li><a href="https://medium.com/@bhagyamangale/overview-of-net-core-6026ddb6675c">Overview of .NET Core</a></li><li><a href="https://medium.com/@bhagyamangale/kestrel-web-server-and-reverse-proxy-in-asp-net-core-ab9a0f027e9">Kestrel Web Server and Reverse Proxy in Asp.net Core…</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e847d735ede3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kestrel Web Server and Reverse Proxy in Asp.net Core…]]></title>
            <link>https://medium.com/@bhagyamangale/kestrel-web-server-and-reverse-proxy-in-asp-net-core-ab9a0f027e9?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab9a0f027e9</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Mon, 25 May 2020 12:39:36 GMT</pubDate>
            <atom:updated>2020-05-30T17:10:13.656Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*VJUxU9wDTVYpFVZnImQnLQ.jpeg" /></figure><p>Hello…! In this article we are going to see about, Kestrel Web serves,Reverse Proxy, Http context, Header request/response, and How to see Server name. So let’s see…</p><ul><li>When we run our MVC application then first the ‘program.cs’ File is load.</li><li>The program.cs file starts the ‘Kestrel’ Web server.</li><li>First, we’ll see what is Web Server.</li></ul><h4>What is a Web Server?</h4><ul><li>Web server is a software which installs on the server it has different vendors like kestrel, Apache, Nginx, and IIS it takes HTTP request from browser it listens to them and understands them and it throws response on the browser.</li><li>In webserver there are two devices in-network and when they communicate they use a protocol.</li><li>Protocol means that format in which the data will be sent between two computers and they understand it.</li><li>Here are HTTP, USP, TCP, and so.on protocols are used to send data or communicate.</li></ul><h4>*HTTP Protocol</h4><ul><li>When we want to see a website at that time we use the HTTP Protocol.</li><li>The format of the HTTP Protocol is Request and Response.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IBpccvln-icg8O5V79hhIg.png" /><figcaption>Web server Diagram</figcaption></figure><ul><li>Here in the above diagram the end-user sends a request through the browser to the web server, The web server accepts that request and understands it and then the web server sends the response to the browser.</li><li>There are other web servers that are IIS (Internet Information Services), Apache, Nginx, and especially for MVC Core there is a ‘Kestrel Web Server’.</li></ul><h4>*Let’s see what is Kestrel</h4><ul><li>Kestrel is a webserver which is invented by Microsoft specifically for .NET Core.</li><li>When we send a request to the kestrel web server, kestrel passes it to the controller and it loads view, model and it takes the response of controller and sends it to the end-user.</li><li>Kestrel is an open-source, cross-platform, and a default web server used for Asp.Net Core applications.</li></ul><h4>*HTTP Context</h4><ul><li>Http Context is the pair of request and it’s response.</li><li>There is an HTTP Context that has it’s request and response, the request comes to the 80 port it is listened by the web server and the response of the webserver is go as a response to the browser.</li><li>This is the process of HTTP Context.</li></ul><h4>*Kestrel Reverse Proxy</h4><ul><li>Kestrel is used in a reverse proxy configuration. The architecture of kestrel is in reverse proxy concept.</li></ul><blockquote>So what is Reverse Proxy</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*t7VBrqionL2DMLRHeUzg5g.png" /><figcaption>Reverse ProxyDiagram</figcaption></figure><ul><li>When a request is coming from the internet or browser to our application, first it hits strong web servers like IIS/Nginx/Apache.</li><li>And they will forward this request to the kestrel because kestrel understands the application code.</li><li>Then the kestrel loads controller, view, and model, and it passes the response to the IIS, and IIS sends it to the browser.</li><li>Kestrel web server is not used as standalone, the purpose of the kestrel web server is to parse only MVC Core.</li><li>When we use MVC Core application for production we definitely have 2 web servers.</li></ul><p><strong>#Now we’ll see how to identify which web server is used for an application. So let’s see…</strong></p><ul><li>When we load an application simply do a fun + f12 and go to the Network panel.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l_89SzNgFFDIJ1qS26CgIA.png" /><figcaption>Google Function(f12) request response (server)</figcaption></figure><ul><li>Select any request of application and open the Response panel.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dt4Gq9Xa2xfvyjNi3Gz34w.png" /><figcaption>Google Function(f12) request response (server)</figcaption></figure><ul><li>We can see there, Headers are present in headers there is a Response Header and Request Header.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lfGaXrsw_T2CRbsX_mGKLQ.png" /><figcaption>Google Function(f12) request response (server)</figcaption></figure><ul><li>It means when the end-user sends the request and gets the response that data is passed in headers.</li><li>And there are one another option i.e Query String Parameters it means when we want to send data to the server it is like</li></ul><blockquote><a href="http://www.questpond.com/?name=&#39;Bhagyashri&#39;">www.questpond.com?name=&#39;Bhagyashri&#39;</a></blockquote><ul><li>This is called Query String Parameters.</li><li>So here in Response Header there is something like a server that shows which server is used for that application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7KB2Wz22eEvDSaBUZPmCQ.png" /><figcaption>QuestPond Function(F12) request respond (server)</figcaption></figure><ul><li>Sometimes people are doing ‘HoneyPot’ on server names so that no one can know which server is used for the application.</li></ul><h4>*HoneyPot</h4><ul><li>HoneyPot is a fake target that is purposely placed on PC or Network to keep hackers away from the confidential files</li><li>So here when we change the IIS Express name and add MVC application name and run directly through command prompt then we can see the server name is ‘Kestrel’.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjPj02eMte_mhBpNdZv86w.png" /><figcaption>ASP.Net Application code</figcaption></figure><p><strong>#Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXx0YrGR2xQa-aVN9hj9Bg.png" /><figcaption>ASP.Net Application output</figcaption></figure><p>So in this article, we have seen about the Kestrel web server and more other points I hope you understand all points and for more understanding watch the following video.</p><p>Learn MVC Step By Step Happily :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fipio9ze57X8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dipio9ze57X8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fipio9ze57X8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href">https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href</a></iframe><p>Thank You!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab9a0f027e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overview of .NET Core]]></title>
            <link>https://medium.com/@bhagyamangale/overview-of-net-core-6026ddb6675c?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/6026ddb6675c</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Sun, 24 May 2020 12:54:49 GMT</pubDate>
            <atom:updated>2020-05-24T12:54:49.219Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview of .NET Core</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sosxsUKzxeZj-k-JCmgLgQ.jpeg" /></figure><p>Hello…!! In this article we will see the overview of the .NET core. So let’s see…</p><ul><li>.NET Core is a free and open-source computer software framework and .NET core is for building websites, services, and console applications.</li><li>.NET Core is a development platform maintained by Microsoft.</li><li>.NET framework is an old version and it only runs on windows platform, and .NET Core is the new version and it is a cross-platform framework so it can be run on any non Window platform.</li><li>For using .NET Core we have to install it first, So let’s install it…</li></ul><h4>Installation of .NET Core</h4><ul><li>We can install .NET core in two ways</li></ul><blockquote>Install .NET Core Runtime or .NET Core SDK OR by installing in visual studio.</blockquote><ul><li>To install the .NET Core go to the following link and download the latest version of .NET Core</li></ul><p><a href="https://dotnet.microsoft.com/download">Download .NET (Linux, macOS, and Windows)</a></p><ul><li>When you go and open the above link you will see the following window.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*8m9SIBR-FtIVKc8zYkc3Fw.png" /><figcaption>.NET Core Download Window</figcaption></figure><ul><li>Here in the above window you can see there are two things .NET Core new version and .NET Framework old version.</li><li>In .NET Core 3.1 version there are two options: .NET Core Runtime and .NET Core SDK</li><li>.NET Core Runtime is used for only run the .NET Core application.</li><li>And .NET Core SDK(Software Development Kit) this SDK has tools and libraries for the development of .NET Core application.</li><li>So for building the .NET Core application we need to install .NET Core SDK.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*c3bLuGj-KPE1yCmaJx0wvg.png" /><figcaption>.NET Core Download Window</figcaption></figure><ul><li>Click on the ‘Download .NET Core SDK’ option and download it.</li><li>After downloading install it in your device.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*BQBb50NCTlgGnBBN4mSAsw.png" /><figcaption>installing page</figcaption></figure><ul><li>After installing .NET Core successfully we can develop .NET Core application.</li></ul><h4>Creating .NET Core Application Using CLI</h4><ul><li>For creating the .NET Core Application using CLI first open the command prompt and create a new application.</li><li>Now first we’ll see some other commands.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*FSvmCFkdzDpZScIuzyPG9g.png" /><figcaption>version command</figcaption></figure><ul><li>In the above window there is a command ‘dotnet — version’ this command is used to check the version of .NET Core.</li><li>Now for creating a new .NET Core application run the following command.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*VwC58sT36SkcO_2Sckz06w.png" /><figcaption>new mvc command</figcaption></figure><ul><li>Using the above command ‘dotnet new mvc’ we have create a new application of MVC.</li><li>Now to build the application we use the ‘dotnet build’ command.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*vT6ukBRy-YDOPDZhH_QCIg.png" /><figcaption>build command</figcaption></figure><ul><li>We have build our application now we run the application and for that, we have to run ‘dotnet run’ command.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*TTApmfj6nwcej13RUcSN2Q.png" /><figcaption>run command</figcaption></figure><ul><li>We can see in the above window there is a port number <strong>‘</strong><a href="http://localhost:5000&#39;"><strong>http://localhost:5000&#39;</strong></a> this port is used to run our application on browser.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TL2Zpucd-b5ceCBwd45Nzg.png" /><figcaption>error page</figcaption></figure><ul><li>We can see there is one error it says that ‘Your connection is not private’ it means when we run the .NET Core application on https .NET Core application is by default force to use SSL.</li></ul><p><strong>#What is SSL?</strong></p><ul><li>SSL is a Secure Socket Layer, it is a cryptographic protocol to provide security over internet communications.</li><li>So now for see the output we have to go to ‘Advanced’ and click ‘proceed to localhost(unsafe)’ and you can see the output.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pYrkcx39Z03-WIbK_ImC6g.png" /><figcaption>Output 1</figcaption></figure><ul><li>This is the output of .NET Core application.</li></ul><h4>Creating a .NET Core application using Visual Studio</h4><ul><li>First open Visual Studio and click File → New → Project.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ID0m3drX2Q5hML6UfmTdXg.png" /><figcaption>Visual studio window</figcaption></figure><ul><li>Then go to Visual C# → web → ASP.NET Core Web Application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsbwjrNCl6UzXSxcyXFDAw.png" /><figcaption>Visual studio selection page</figcaption></figure><ul><li>And then go give the name to the application, I have given a name as ‘DotNetCoreApplication’.</li><li>Now we select Web Application(model-view-controller).This will create a new .NET Core MVC application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7QaRyXdL9lJl5mbP6WXyQ.png" /><figcaption>MVC selection</figcaption></figure><ul><li>Our .NET Core MVC application in Visual Studio is created successfully.</li><li>Now for run, the application on browser simply clicks on ‘IIS Express’ and we can see our application is run on browser successfully.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tyc2MxsU4pDvF3bV_545Kg.png" /><figcaption>output 2</figcaption></figure><p>So in this article we see how to download and install .NET Core, and how to create .NET Core application and run it. And for more understanding watch the following video.</p><p>Learn MVC Step By Step Happily :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fipio9ze57X8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dipio9ze57X8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fipio9ze57X8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href">https://medium.com/media/c1d766c328d48862cb644023d53dfd11/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6026ddb6675c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Step By Step Part-4 (Angular Routing)]]></title>
            <link>https://medium.com/@bhagyamangale/angular-step-by-step-part-4-angular-routing-b95252142902?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/b95252142902</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Sat, 23 May 2020 09:15:59 GMT</pubDate>
            <atom:updated>2020-05-23T10:00:42.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*NbOZmmH7LThV0zJx3JJgxA.png" /></figure><p>Hello Readers…! In this article we are going to see What is Routing in Angular ? and how it is done. So let’s see…</p><h4><strong>#What is Routing in Angular?</strong></h4><ul><li>Routing is nothing but moving from one page to another page. Means navigating between pages.</li><li>For Routing we at least need two UI.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*PUgCaWoydDyFfSI-16cJ9Q.png" /><figcaption>UI image</figcaption></figure><p>So we have here Student and Home UI.</p><ul><li>Now I’m going to do routing in these two UI Step By Step. So let’s start…</li></ul><p><strong><em>Step 1:</em></strong> First we have to create a router link on both UI for navigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*_MUPqUx0Ms45MXf49kAJfA.png" /><figcaption>Home page router link</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*sjf1gCwJPsSAQTGlZ05Qag.png" /><figcaption>Student page router link</figcaption></figure><p><strong><em>Step 2:</em></strong> Now we have to create a routing folder for store routing files so that we can easily find the file from the list.</p><blockquote>Create new Folder-&gt;Routing-&gt;New File-&gt;MainRoutes.ts</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*nHoDufFCKjlqsHO0rV7Ung.png" /><figcaption>A router folder</figcaption></figure><p><strong>*NOTE: </strong>MainRoutes is const because someone will do not change it.</p><ul><li>Routing is a collection of <strong><em>URL And Where to go…</em></strong></li></ul><p><strong>#For example:</strong></p><blockquote>/Student → StudentComponent.ts →templetURL →HTML page.</blockquote><ul><li>When we click on <em>/Student</em> Router link it goes to the StudentComponent file.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*Gc5I8chmyWBU77SIJ4_ePQ.png" /><figcaption>Student component path</figcaption></figure><ul><li>In the StudentComponent file it finds the templetURL inside the <a href="http://twitter.com/Component">@Component</a> Decorator.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*TsKQ71KrF1gsEZwb1fAl0g.png" /><figcaption>templateUrl of student HTML</figcaption></figure><ul><li>And this templetURL will load a specific HTML page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*ObxaORCxIPX-qlV5NxxHHw.png" /><figcaption>Student HTML page</figcaption></figure><ul><li>So this is how the path is work.</li></ul><p><strong><em>Step 3:</em></strong> Create Shell-Page or you can call it a Master page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*yZgz8ceR__VabLDxe7U_BQ.png" /><figcaption>Master page HTML</figcaption></figure><ul><li>The above file is a shell-page we call it Master-page in this page we have a &lt;router-outlet&gt; &lt;/router-outlet&gt; tag.</li><li>Let’s see how this tag is working.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*5b37cUlldq0FXfSNTHqWxg.png" /><figcaption>Shell-page</figcaption></figure><ul><li>We can see in above diagram in a shell_page their is a &lt;router-outlet&gt; &lt;/router-outlet&gt; is present .</li><li>It is an angular define area where routing pages are loaded and unloaded.</li></ul><p><strong>#Example:</strong></p><ul><li>When we click on Student page then Student page will load into the &lt;router-outlet&gt; &lt;/router-outlet&gt; and when we click on Home page then Student page will unload and Home page will load into &lt;router-outlet&gt; &lt;/router-outlet&gt;.</li></ul><p><strong><em>Step 4:</em></strong> imports the router file and Declare all components into our Main module.</p><p><strong>*NOTE:</strong> In the Routing process, there is only one Module and one Routing file for all the routing pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*YwAEQzn69DfoxSJLX3_B5A.png" /><figcaption>MainModule file</figcaption></figure><ul><li>In the above window we can see that here I have import the ‘RouterModule’ from <a href="http://twitter.com/angular/router">@angular/router</a> this RouterModule is used to imports the routing files into the Module.</li><li>Then next in the ‘declarations’ I have declared all the components i.e HomeComponent, MasterPageComponent, and StudentComponent.</li><li>So when our application will run all these components are loads for the first.</li><li>See below in the ‘imports’ I have imports RouterModule.forRoot(MainModule), using RouterModule imports the routing file into the Module.</li><li><strong>forRoot:- </strong>forRoot is used when the Module is ‘Eager’ it means the forRoot is used for loads the Module when the application is started for the first time.</li><li>Below there is a ‘bootstrap’, the bootstrap is a technique of initializing or loading our angular application. So we have to put that component in the bootstrap [] which will load for the first time when our application is run.</li></ul><p><strong><em>Step 5:</em></strong> Now Run the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*FrjlvfCvnc9yfOvSWBWkKQ.png" /><figcaption>Master and Home page</figcaption></figure><ul><li>When we click on <strong>Go to Student</strong> Router link it will go to the Student page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*DQLyAtXuxzs1ILP6A09euw.png" /><figcaption>Student Page</figcaption></figure><ul><li>And the routing is successfully run.</li></ul><p>So this how the routing process is done. and for more understanding watch the following video.</p><p>Learn Step By Step Happily :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFV2MXOygDTM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFV2MXOygDTM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFV2MXOygDTM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d79f845ccd2be5a55515fcb9064300c5/href">https://medium.com/media/d79f845ccd2be5a55515fcb9064300c5/href</a></iframe><p><a href="https://medium.com/@bhagyamangale/angular-step-by-step-part-1-68b22205ba3f?source=your_stories_page---------------------------">Angular Step By Step Part-1 Introduction of Angular</a></p><p><a href="https://medium.com/@bhagyamangale/angular-step-by-step-part-2-9f4ebae1a168?source=your_stories_page---------------------------">Angular Step By Step Part-2 Folder Structure and Package.json v/s package-lock.json</a></p><p><a href="https://medium.com/@bhagyamangale/angular-step-by-step-part-3-962c702e266e?source=your_stories_page---------------------------">Angular Step By Step Part-3 Angular Data Binding</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b95252142902" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Step By Step Part-3]]></title>
            <link>https://medium.com/@bhagyamangale/angular-step-by-step-part-3-962c702e266e?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/962c702e266e</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Sat, 16 May 2020 16:43:08 GMT</pubDate>
            <atom:updated>2020-05-22T11:02:11.962Z</atom:updated>
            <content:encoded><![CDATA[<h3>Angular Step By Step Part-3 (Angular Binding)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NMQK8UeLVTmVRe6IV-wNDQ.png" /></figure><p>Hello…!! In this article we are going to understand how to Bind the View and Component, And types of binding. So let’s see…</p><h4><strong>#What is binding ?</strong></h4><ul><li>Binding is a process of making communication between UI and Component. Data binding is creates the connection between the UI and Component.</li><li>When the data changes its value,all the elements bound to it reflect that changes automatically.</li><li>Their are two types of binding the data, So let’s see…</li></ul><blockquote><strong>#Way’s of Binding.</strong></blockquote><p><strong>1.One way binding</strong></p><ul><li>One way binding will bind the data and make flow from only one side to the another. Like only flow from component to UI OR flow from UI to component.</li><li>One way binding has two type’s :-</li></ul><blockquote><strong>Property Binding</strong></blockquote><ul><li>Property binding is used to bind the values of component to the HTML element. For passing the value of component to UI ‘[]’ (Square) brackets are used.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*lWIhAtJ0EVFv6ETiEfyVJA.png" /></figure><p><strong>#Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*LRqqQMmhQN25JiGa_9VxLw.png" /><figcaption>UI</figcaption></figure><ul><li>In the above window their is one textbox named as ‘StudentName’. It have ‘value’ property within ‘[]’ brackets which passes the value from component to the StudentName textbox.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*en-qMcSQ8n5ZKwgd_aF0Aw.png" /></figure><ul><li>In above window we have create String variable ‘studentName’ which hold’s a value “Bhagyashri”.</li><li>Now run the code to see the Result:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*y1FvJ4u9YWe5-iXgyPamHQ.png" /></figure><ul><li>We can see that the vale which is present in component is display in textbox.</li><li>This is called Property binding which pass value from Component to UI.</li></ul><blockquote><strong>Event Binding</strong></blockquote><ul><li>Event binding is used to bind the values of HTML elements to the Component property. For passing data from HTML to Component use ‘( )’ (Round) brackets.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*Le2L5UdFaHvSNgHWq5BYHQ.png" /></figure><p><strong>#Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*60AdwHdXm0PfkGIhoSGQHg.png" /></figure><ul><li>In above window we have create one button element and pass the value of button element to the Component by using ‘Click()’ method.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*5v592iB4Cw4_9Gp6LjEqow.png" /></figure><ul><li>The above window is of component window in the component we have create one Click() method and pass the value “Bhagyashri” to it.</li></ul><p>Before Clicking a Button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*h3NesRFIua4ItgoEtVWlYw.png" /></figure><p>After Clicking a Button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*S8ElqMNhdZ6z3r1FWObPWA.png" /></figure><ul><li>We can see Before the name is not present in the textbox but now after clicking the button name is fetch from Component.</li></ul><p><strong>2.Two way binding</strong></p><ul><li>Two way binding bind the data and it passes the value from both sides Component to UI and UI to Component.</li><li>It is the combination of Property Binding and Event Binding.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*6ZgfCN5xn-PnXX1KS4lNsA.png" /></figure><ul><li>To passing or binding the data from both sides uses the [(ngModel)] directive. ngModel is binds the HTML control’s values to a property on the object.</li><li>Directives are angular code inside the HTML and responsible for changing the behaviour of HTML tags.</li></ul><p><strong>#Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*m_BqoNGV0ifJ7VdcjsTxGQ.png" /></figure><ul><li>In above window the [(ngModel)] directive is used to assign the name property to it which hold string value.</li><li>And click method is used to fetch the component value in the input tag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*HaLPDvP7iah5iYhBMMsJQw.png" /></figure><ul><li>In the above window in the Click() method ‘21’ value is assigned to the ‘rollNo’ property.Now let’s see the result.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*_GYwGXK909J2HStueVjrEQ.png" /></figure><ul><li>Oops! the Error is occurred, see the error it say’s ‘ngModel isn’t a known property’ means the angular doesn’t understand the [(ngModel)] directive.</li><li>So to fix this error open the module and import FormsModule into it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*_eqy4LOxVYI3JiIXVpXQbQ.png" /></figure><ul><li>Now after fixing the error run the application again you will get the result.</li></ul><p>Before Click a Button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*IRjDQVSZALrUbDlxGDLUgg.png" /></figure><p>After Click a Button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*GciyEdn--xOxmAXQ4_drcw.png" /></figure><p>So in this article we have understand what is binding and its type’s and for more understanding watch following video.</p><p>Learn Step By Step Happily :-)</p><p><a href="https://youtu.be/FV2MXOygDTM">https://youtu.be/FV2MXOygDTM</a></p><p><a href="https://medium.com/@bhagyamangale/angular-step-by-step-part-1-68b22205ba3f?source=your_stories_page---------------------------">Angular Step By Step Part-1</a> Introduction of angular</p><p><a href="https://medium.com/@bhagyamangale/angular-step-by-step-part-2-9f4ebae1a168?source=your_stories_page---------------------------">Angular Step By Step Part-2</a> Folder Structure and package.json v/s package-lock.json</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=962c702e266e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CAngular Step by Step Part-2]]></title>
            <link>https://medium.com/@bhagyamangale/angular-step-by-step-part-2-9f4ebae1a168?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f4ebae1a168</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Wed, 13 May 2020 07:14:03 GMT</pubDate>
            <atom:updated>2020-05-23T09:38:05.627Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZHQqjAXEO5QYfTEr.png" /></figure><p>Hello…!! In my previous article we have seen What is Angular, Node, NPM and Angular CLI. In this article we are going to understand Folder Structure of the Angular and difference between package.json &amp; package-lock.json. So let’s see…</p><h3>#Folder Structure</h3><p><strong>*e2e</strong> <strong>:</strong> End to End testing. This folder is used for testing purpose.</p><p><strong>*node_modules : </strong>When we fire npm install command it installs all the packages which are necessary for angular and that all packages are copied into this ‘node_modules folder’.</p><p><strong>*src :</strong> ‘Source code folder’ inside this folder their is ‘app folder’ which contain all the code of Angular.</p><p><strong>*angular.json :</strong> This is the configuration file of Angular. All the configuration of angular is in this folder.</p><p><strong>*dist :</strong> This folder is contain all final output of the application which will take to the production that all final output is in this folder.</p><p><strong>*ts.config :</strong> This is the configuration file of Typescript.</p><p><strong>*tslint.json :</strong> This file is used for linting process.</p><p><strong>Linting process :</strong> This is used for finding error from source code, that can be any kind of source code it can be programmatic or typing errors also.</p><h3>#package.json V/S package-lock.json</h3><h3>*Package.json</h3><ul><li>package.json file is called as node configuration file. This file stores the name and versions of the packages which are installed in projects.</li><li>package.json file has two part i.e ‘Dependencies’ and ‘devDependencies’.</li></ul><blockquote><em>i. Dependencies are required for running the angular application.</em></blockquote><blockquote><em>ii. devDependencies are necessary to develop the angular application.</em></blockquote><ul><li>Every Node JS package or module should have this file at root directory to describe its metadata in plain JSON object format.</li><li>npm uses the package.json file to specify the version of a package that our app depends on.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*nw2V-IEfr5_PJDB6MIJ2UA.png" /></figure><h3>*Versioning system in package.json:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/151/1*dcr25vsyv_HMdVMpe4UnJw.jpeg" /></figure><p><strong>*Major version:</strong></p><ul><li>It is Breaking Change of software functionality. It means when the software functionalities are not working then we will change the major version of software.</li></ul><p><strong>*Minor version:</strong></p><ul><li>Minor version is increment when we add new features in software.In this version only new features are add into software the another code is still working.</li></ul><p><strong>*Revision:</strong></p><ul><li>The Revision version is increment when we fixes bugs into the software.In this version no adding of features and no breaking changes.</li></ul><h3>#Difference between tilde(~) and caret(^) in package.json</h3><blockquote><strong><em>*caret(^): </em></strong><em>The carrot sign only increment in minor and revision.</em></blockquote><p><strong><em>#Example:</em></strong></p><ul><li>Consider (4.7.5) version is their, the caret sign will get only higher minor/revision version.It will never get higher major versions.</li><li>So if (4.7.5) has higher version (4.7.7) then it will get the (4.7.7) version. But if their is (5.0.0)version, then it will not get that version because it will be in major change.</li></ul><blockquote><strong><em>*tilde(~): </em></strong><em>The tilde sign will only get highr ‘revision’ version.It will be match the most recent revision version. But it does not match any major /minor version.</em></blockquote><p><strong><em>#Example:</em></strong></p><ul><li>Suppose their is (4.7.3) version then this version will match all (4.7.x) versions. But it will not match 4.8.0 or 4.8.x version and also not match 5.0.0 version.</li><li>So it will be the issue, if the package developers break any of the functions on the minor version then it will make your application break down.</li><li>So for solving that issue the npm has created a new file called ‘package-lock.json’.</li></ul><h3>*package-lock.json:</h3><ul><li>It will be shows the exact version of the package in our project and save the dependency in package.json with a carat(^) sign.</li><li>In this file if the current version of package is 5.4.4 then the installed version will be 5.4.4 and the saved dependency will be ^5.4.4.</li><li>Here caret(^) sign indicates that it will support any higher version with major version 5 i.e 5.5.1.</li><li>The package-lock.json file is created for locking the current version.</li></ul><p>So in this article we have seen the folder structure and the difference between package.json and package-lock.json I hope you understand.</p><p>To learn Angular step by step go to the following links:</p><p><a href="https://medium.com/@bhagyamangale/angular-step-by-step-part-1-68b22205ba3f?source=your_stories_page---------------------------"><strong><em>Angular step by step 1</em></strong></a><strong><em> Introduction of Angular</em></strong></p><p>Learn Step By step Happily :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f4ebae1a168" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Step By Step Part-1]]></title>
            <link>https://medium.com/@bhagyamangale/angular-step-by-step-part-1-68b22205ba3f?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/68b22205ba3f</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Thu, 07 May 2020 10:31:37 GMT</pubDate>
            <atom:updated>2020-05-07T10:31:37.714Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u3mgmYMq4ofTd4lBtZtbxQ.png" /></figure><p>Hello…! You have seen all my previous articles of Typescript,JavaScript and SQL Server and I hope you understood all that points. So from this article we are starting Angular.</p><p>First we will see what is an Angular, node &amp; npm and What is Angular CLI.So let’s start…</p><p><strong>#What is Angular ?</strong></p><ul><li>It is a open source JavaScript framework which bind the JavaScript objects and HTML elements together.</li><li>It is a framework which is used to application designing and developing platform. Angular is used to creating single-page application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*k_u_MK4LmTzLjDfEzlGiEg.png" /></figure><ul><li>The above figure clears that what Angular actually do.</li></ul><p><strong>#Node</strong></p><ul><li>It can help you to run JavaScript outside the browser.</li><li>Without Node we can not run Angular. Because angular required some type of framework to install it.And Node is fully programming platform.</li><li>For installing Node click on following link.</li></ul><p><a href="https://nodejs.org/en/">Node.js - Run JavaScript Everywhere</a></p><ul><li>After go to the above link we’ll see the following window.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*7SrOnRvtyNcDPQsI21Wr_w.png" /></figure><ul><li>In above window their are two versions 12.16.3 LTS and 14.2.0 Current version.</li></ul><p>So what is the meaning of that two versions let’s see…</p><blockquote>*14.2.0 Current version is a latest version has latest features.But it is possible that it not stable.</blockquote><blockquote>*12.16.3 LTS is Recommended for most users and it is stable.So we can install it.</blockquote><ul><li>After installing Node open Node.js command prompt and change your current directory to the your angular folder and then fire a command-&gt; npm install jquery.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*8Hvsk16ZMagmq2Q9joXazw.png" /></figure><p><strong>#NPM(Node Package Manager)</strong></p><ul><li>It is a software application which will helps us to find software packages and install it on our local system,manage it and uninstall if we don’t want it.</li><li>And for that we need strong internet connection.</li><li>By using NPM,installing packages are more difficult,because using this NPM we have to install packages one by one so we use Angular CLI’.</li></ul><p><strong>#Angular CLI</strong></p><ul><li>The Angular CLI is a command line interface. It can helps us to get everything that needs for angular.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*leyBrKk6ZXy6VN387K0w0g.png" /></figure><ul><li>In above window we can see their are four different commands, let’s see what is the meaning of that commands.</li><li><strong>npm install -g package_name - </strong>It is used to install any package globally on system.That means we can run that package any drive using command prompt.</li><li><strong>ng new my-dream-app-</strong> This command is used to create a new application also we can create new project structure.</li><li><strong>cd my-dream-app-</strong> This command is used to change the current directory with your new application ‘my-dream-app-’.</li><li><strong>ng serve-</strong> This command is used to compile your application while developing, it test your application locally easily.It compiles,building,bundling and then hosted application on port.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*jWX9pukGhe25hDfTesrlDQ.png" /></figure><ul><li>Using the port ‘<a href="http://localhost:4200/&#39;">http://localhost:4200/&#39;</a> we can run the application on browser.</li><li>we will see the following window</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g6uU05QMjjAtWOn1XkNrfQ.png" /></figure><ul><li>Then to make changes in your application go to VS code and open youe application folder.</li><li>If you don’t have VS code then click on following link download it and install it in your device.</li></ul><p><a href="https://code.visualstudio.com/">Visual Studio Code - Build what comes next</a></p><ul><li>Then open VS code -&gt; click open folder-&gt;select the folder which you have created.</li><li>You can see the folder structure at right side of the window. go to src folder-&gt; in app folder-&gt; and you will see all your files.</li><li>To compile files compile on terminal it’s right down on window, if it is not their then go to View-&gt;and select terminal.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A90K1oB25kyxNs8-E3NeAA.png" /></figure><p>So in this article we have seen all basics of angular how to install and how to run I hope you understand all points and for more understanding watch following video.</p><p>Learn Step By step Happliy :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFV2MXOygDTM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFV2MXOygDTM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFV2MXOygDTM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d79f845ccd2be5a55515fcb9064300c5/href">https://medium.com/media/d79f845ccd2be5a55515fcb9064300c5/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68b22205ba3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Normalization in SQL]]></title>
            <link>https://medium.com/@bhagyamangale/normalization-in-sql-ce1a6adf04e2?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce1a6adf04e2</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Wed, 06 May 2020 10:34:40 GMT</pubDate>
            <atom:updated>2020-05-06T10:34:40.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BAdKE4P7TduNkzio1oqmPg.jpeg" /></figure><p>As we see in my previous articles SQL Server part-I and part-II and Sql Query Writing part-I and part-II how to install SQL server on own device, how to use it and how we can fire queries. So in this article we are going to know about ‘Normalization’, So let’s see…</p><ul><li>In Normalization we go from ‘Lower’ to ‘Higher’ normal form. Normalization is used to avoid ‘Redundant data’ and ‘Duplicate data’ into Database.</li></ul><blockquote><strong>*Before go further let’s see what is Redundancy and Duplication ?</strong></blockquote><p><strong>#Redundancy</strong></p><ul><li>Redundancy means multiple ways of expressing the same things, i.e multiple synonyms of one thing that are present in database.</li><li>Redundant data is takes efforts to fix.</li></ul><blockquote><strong>*See the following window:</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*ffkm8EYRCuylC1-bfbLVMw.png" /></figure><ul><li>As we can see in above table there are more than one students are belongs from the INDIA , but they are mentioned different names of INDIA i.e “Synonyms”.This is the meaning of Redundancy.</li><li>When we try to search students from India then we’ll fire a select query <em>SELECT * FROM tblStudent WHERE CountryName=’INDIA’;</em></li><li>We’ll find only 1 record which is from INDIA, So this is the problem of Redundancy and for solving this problem we use Normalization.</li></ul><p><strong>#Duplication</strong></p><ul><li>Duplicate data means EXACTLY the same copy of the data.</li><li>As we can see in below table their is a ‘New York’ country name is present for two times.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*ffkm8EYRCuylC1-bfbLVMw.png" /></figure><ul><li>So this is the Duplication of data means the same copy of the actual data is present in database.</li><li>For reducing Redundancy and Duplication we use Normalization.</li></ul><blockquote><strong>*There are five normal forms which are used in database Normalization.</strong></blockquote><p>1. First Normal Form(1NF)<br>2. Second Normal Form(2NF)<br>3. Third Normal Form(3NF)<br>4. Boyce-Code Normal Form(BCNF)<br>5. Fourth Normal Form(4NF)</p><blockquote><strong>*Let’s see normal forms one by one…</strong></blockquote><p><strong>1.First Normal Form(1NF)</strong></p><ul><li>Rules of 1NF are:</li></ul><p><strong><em>i.</em></strong> Eliminating repeating groups and break data into smaller logical pieces.<br><strong><em>ii.</em></strong> Avoid duplicate data.</p><p><strong>#Example</strong></p><ul><li>Consider the Student table.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*ijq5BJEe1hlPZ64JvM1HXA.png" /><figcaption>Student Table</figcaption></figure><ul><li>As per the first normal form split the table into two different tables.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*NOJC1A1Z9H_jAKocoFrUaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*K43hn0rCFtok3Movm_C35g.png" /></figure><ul><li>Now we can eliminate duplicate values.</li></ul><p><strong>2.Second Normal Form(2NF)</strong></p><ul><li>Rules of 2NF are:</li></ul><p><strong><em>i. </em></strong>Table is said to be in a 2NF if it is in 1NF.<br><strong><em>ii.</em></strong> There is no any partial dependency, the table have only one primary key and all remaining attribute are depends on that primary key.</p><p><strong>#Example</strong></p><ul><li>Consider the following table</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*-OgbCUuktCb8w7As9UQ1fQ.png" /></figure><ul><li>In the above table their is two id’s one is student id and another is project id and both the name of student is depend upon student id and project is depend upon project id, so we can’t assign a primary key for two attributes in one table so we have to split this table in two different tables.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*Dv_yS1MZCjEAissrCDp4Sw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*ZF2oRS6h_ncSMShw7W-FeQ.png" /></figure><p><strong>3. Third Normal Form(3Nf)</strong></p><ul><li>Rules of 3NF are:</li></ul><p><strong><em>i.</em></strong> Table is said to be a 3Nf if it is in 2NF.<br><strong><em>ii.</em></strong> There is No any transitive dependency.</p><blockquote><strong>*What is transitive dependency ?</strong></blockquote><ul><li>The transitive dependency means when their are functional dependency.such that X is dependent on Y and Y is dependent on Z then Z is transitively dependent on X via Y.</li></ul><p><strong>#Example</strong></p><ul><li>Consider the following table</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*OMdFVwXi1NZPs2JfzYQ5eA.png" /></figure><ul><li>In this above table using StudId we can get Fees slip no,fees and student nae also and this is the transitive dependency, so for avoid the transitive dependency we have split the table.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*TbSIJ2LDPqWiJJ2QubmlYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*AsBLZ-gDa9qkr_pnJu9E7A.png" /></figure><p><strong>4. Boyce-Code Normal Form(BCNF)</strong></p><p><strong><em>i.</em></strong> It is higher version of 3NF.<br><strong><em>ii.</em></strong> A table does not contain any dependency.</p><p><strong>5. Fourth Normal Form(4nf)</strong></p><p><strong><em>i.</em></strong> Table is said to br in 4NF if it is in 3Nf.<br><strong><em>ii.</em></strong> A table does not contain any multi-valued dependencies.</p><p>So in this article we have seen about normalization in sql and for more understanding watch following video.</p><p>Learn Step By Step Happily :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fwp0N1tYjEWc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dwp0N1tYjEWc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fwp0N1tYjEWc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/234bea339ce14097a3ddb7729d884ece/href">https://medium.com/media/234bea339ce14097a3ddb7729d884ece/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce1a6adf04e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Query Writing Part-II]]></title>
            <link>https://medium.com/@bhagyamangale/sql-query-writing-part-ii-5d3acc1fb23d?source=rss-6d2a0609e839------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d3acc1fb23d</guid>
            <dc:creator><![CDATA[Bhagya Mangale]]></dc:creator>
            <pubDate>Sun, 26 Apr 2020 10:16:03 GMT</pubDate>
            <atom:updated>2020-04-26T10:16:03.029Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*aCZP8n35ZPAM2sTp91IQLQ.jpeg" /></figure><p>In previous article SQL Query Writing Part-I we have seen the SELECT statement with different condition’s and a WHERE clause,So in this article we’ll see JOIN queries so let’s see…</p><ul><li>So first for JOIN query we need two tables and we need relation between them, So let’s create a relation..</li><li>For making a relation we need two tables, we create that tables by using ‘New Database Diagram’ because we create two tables and also their relation so this is a easy way to create tables and their relation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhBhe0KOjAB59unP7oNt-A.png" /></figure><ul><li>First we have to create a database and then go inside that database and right click on ‘Database Diagram’ and select first option.</li><li>When we select option we’ll see a white window, then just right click on that white window and select ‘New Table’ option.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zyA_1q48lT8eF9t8c1FmdA.png" /></figure><ul><li>We will get a small window of table name give a name to table and press ‘OK’ and then table will create just add column names and their datatype. Again for another table do same thing.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CFRKXPR7g-iYvbwVuEpMeA.png" /></figure><ul><li>After creating two table we need to create a relation between them, so for that we need Primary key and Foreign key.</li><li>In ‘tblEmp1’ table add Primary key to ‘EmpId’ and in ‘tblProfession1’ table add Primary key to its ‘ProId’.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RIzdlbD9GXcoZL4Z51fwiQ.png" /></figure><ul><li>Then for foreign key just drag a primary key column of ‘tblEmp1’ to ‘EmpId_fk’ column of ‘tblProfession1’ table we will get the below window’s.</li><li><strong>NOTE:-</strong> Which attribute you want to make a foreign key save that attribute name with ‘fk’ i.e ‘EmpId_fk’.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p3N9f5TkfXdCkE7W3oSCZg.png" /></figure><ul><li>Check Primary key and Foreign key and click ‘OK’ and then again press ‘OK’ and we will see a following window.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5UBLEX-CwlIrMZZMbVRKVw.png" /></figure><ul><li>In above window the Primary key indicates that their is only one record and on another side the infinity sign indicates that their are many records.</li><li>Then save the diagram and just Refresh ‘Tables’. We can see that two tables into our Tables folder.Then add records into that tables. I have already told how to add records into tables in my previous article.</li></ul><blockquote><strong>*Let’s see How to write and run JOIN query.</strong></blockquote><p>There are Four types of JOIN queries:<br>1. Inner Join<br>2. Left Join<br>3. Right Join<br>4. Full Join</p><p><em>Before go to types of JOIN let’s see What is JOIN clause.</em></p><blockquote>The JOIN clause is used to combine rows from two or more tables, based on relation of columns between them.</blockquote><ol><li>Inner Join:</li></ol><ul><li>I<strong><em>NNER JOIN </em></strong>is helps us to show only matching records from two tables.</li></ul><p><strong>#Syntax</strong></p><blockquote>SELECT * <br>FROM table_1<br>INNER JOIN table_2<br>ON table_1.column_name=table_2.column_name;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*S7409YDUBqN9Az1lR3Nm2g.png" /></figure><ul><li>In above result we can see that only matching records are joined. Another records which don’t have any matching they are not joined in the table.</li><li>If we want some columns from two tables to join, then we can join only that columns also.</li></ul><p>2. Left Join:</p><ul><li>In query the table which is present at left side that table becomes ‘Left Table’ and the table which is present at right side that table becomes ‘Right Table’.</li><li>So when we fire <strong><em>LEFT JOIN</em></strong> query it means show all records of ‘Left Table’ and show only matching records from ‘Right Table’.</li></ul><p><strong>#Syntax</strong></p><blockquote>SELECT * <br>FROM table_1<br>LEFT JOIN table_2<br>ON table_1.column_name=table_2.column_name;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*hITKKp92ZKrwOwjvR7LLaw.png" /></figure><ul><li>We can see in above window all the records of left table is shown and only matching records from right table is shown. If their is no matching record then result is NULL.</li></ul><p>3. Right Join:</p><ul><li>The <strong><em>RIGHT JOIN</em></strong> is opposite of <strong><em>LEFT JOIN</em></strong> but the table position is same i.e the left side table is a ‘Left Table’ and right side table is ‘Right Table’.</li><li>When we fire <strong><em>RIGHT JOIN</em></strong> query it means show all the records from ‘Right Table’ and show only matching records from ‘Left Table’.</li></ul><p><strong>#Syntax</strong></p><blockquote>SELECT * <br>FROM table_1<br>RIGHT JOIN table_2<br>ON table_1.column_name=table_2.column_name;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*usYcFvgNpTPBZwZ9UwBoIw.png" /></figure><ul><li>In above window all the records of Right table is shown and only matching records of Left table is shown.</li></ul><p>4. Full Join:</p><ul><li>The<strong><em> FULL JOIN </em></strong>query joins all the records of Left table and Right table together and it puts NULL on place where matches are not found.</li></ul><p><strong>#Syntax</strong></p><blockquote>SELECT * <br>FROM table_1<br>FULL JOIN table_2<br>ON table_1.column_name=table_2.column_name;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*wiLnuDKCybl0D2lNUfeCtA.png" /></figure><p>So this is all about JOIN clause I hope you understand and for more understanding watch following video.</p><p>Learn Step By Step Happily :-)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FuGlfP9o7kmY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuGlfP9o7kmY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FuGlfP9o7kmY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b108a31cf1ed747e6c45d31aa03bdf63/href">https://medium.com/media/b108a31cf1ed747e6c45d31aa03bdf63/href</a></iframe><p>If you want to see my previous articles then go to the following links.</p><ul><li><a href="https://medium.com/@bhagyamangale/sql-server-part-i-ea1e83836967">SQL Server Part-I</a></li><li><a href="https://medium.com/@bhagyamangale/sql-server-management-studio-part-ii-f04ecf8be38c">“SQL Server Management Studio” Part-II</a></li><li><a href="https://medium.com/@bhagyamangale/sql-query-writing-part-i-4a15f6ff51d5">SQL Query Writing Part-I</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d3acc1fb23d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>