Posts

TypeScript Learning

  Typescript is a superset of Javascript or it is JS++ [ JavaScript ++ ]  where first + = brings Type-Safety to Javascript and second + = Makes the developer's life easy. Type-safety All the Typescript code is trans-compiled into Javascript code by using the Typescript compiler. During this phase, if the compiler notices any errors then it shows immediately.  Ex : var x : number = 10;  x = "Hello"; // assigning string value to integer variable.  Typescript compiler throws error  notices this errors then it shows immediately.  In the end, The browser understands only Javascript.                                         Typescript is strictly typed Ease of use With a few lines of Typescript code, we can write a lot of Javascript code. Ex: we can create an Employee class with functions and properties with few lines of code. We can also make use of OOP concepts like interface, inheritance, and encapsulation just like we do in c#. It also provides us easy syntax https://www.typ

Angular Learning

What is SPA - Singel Page Applications There is no complete page re-load that is only required areas are updated instead of reloading the page each and every page at postbacks Speed up the page load and navigation for the users Similar to Desktop applications user experience It gives feeling like there is only one page. Ex : Gmail is developed using SPA I mean we need responsive web apps How to achieve SPA is that we need to use Javascript Frameworks such as AngularJS, KnockoutJS EmberJS, React etc Why we need Angular I want Bi-directional dataBinding  I want to keep HTML separate and Javascript code separate so that we can make use of code-reuse How do I tell the browser that the page is AngularJS is that we need to add directive called "ng-app" to either html tag, Div tag or Body tag What is Directives - It is a special kind of attributes [which has meaning described inside the angular js file referred] for an HTML element Ex: ng-app , ng-init , ng-hide , ng-show,  ng-true-

Web API

  URI - it can be of type http, FTP or mailto. In Web API - all are resource  I guess unlike web service, in web api , we dont create proxy class  First - we need URL second - what types of methods third - what type of data URI will be same but based on method type [GET or Delete ] the action will be invoked inisde API. services.AddDBContext<OrganizationContext> --->inside Configservice class is add like dependency injection way. Reason is since there are lot of controllers then we create in each and every controller OrganizationContext object which is very time consuming process. that's why if we added in  Configservice then Dependency injection will take care of creating the  OrganizationContext object in each and every controller and pass it to the  controller constrcutor and it will also take care of disposing the object also. Swagger  - It is for those who are consuming our developed services Fiddler - It is used for developers to test the scenarios Since we are worki

Understanding MVC Core startup class

Image
First the request will come to Main method, Main method will create a HOST [It can be IIS for .NET framework]. This host can be thought of your servant that will do exactly what you say. Here what we say is put inside startup class with two method  ConfigureServices ----->Here you need to add types of services that your servant will provide Configure-------------->Here what are the steps or stages that servant has to follow for each request raised by the client.  ConfigureServices Example : If, I need servant to provide controller and view services[This service is nothing but set of rules that servant has to follow like "where is the controller folder located", "controller name should end with "Controller", "How the controller should map to the action method and so on ] then I need to add "services.AddControllersWithViews()" in   ConfigureServices method. Configure Here I need to put the different and required stages that request has pass t

Group by in Sql server

Image
  Group by = merge all such column values that are same and show single row of that merged row.  The columns that are in SELECT list and Group by list should be same. Here any 2 rows[all column] values will be same so when u use group by it will return one row. Note : if any row's single column value is different with other row's single column value [i.e.  if any mismatch. See red round circle] then Groupby will return all rows in this case. It returns all the rows because : Till Resource column both rows has same values but since status/decision columns has different values. Group By will return all rows in such cases

Ranking Functions in Sql server

Image
 

Nvarchar in Sql server

  Declare @val nvarchar(1000) select @val = N'GFG में आपका स्वागत है' select @val as HindiLanguage Declare @val nvarchar(1000) select @val = N'ಮಾಹಿತಿ' select @val as kannadaLanguage