Posts

How to Set Default Controller in asp.net MVC 4 & MVC 5 ?

Image
As per my knowledge we can set two way first one is  i) Go to in your project root directory. ii) Go to App_Start folder inside this RouteConfig.cs file open and set as like this RouteConfig.cs And second one is  i) Go to in your project root directory. ii) Go to project property window(Short cut key click on root directory and press  "Alt +Enter") a console window open. iii) Click on Web tab and set as like this Property console

List all employee's names and their managers by manager name using an join

DROP TABLE Employees GO -- STEP 1 CREATE A TABLE NAME AS Employees WITH THREE FIELDS EmpId,EmpName,MgrId CREATE TABLE Employees ( EmpId INT NOT NULL ,EmpName VARCHAR (50) DEFAULT NULL ,MgrId INT DEFAULT NULL , PRIMARY KEY (EmpId) ) -- STEP 2 INSERT INTO VALUES Employees WITH THREE FIELDS EmpId,EmpName,MgrId INSERT INTO Employees ( EmpId ,EmpName ,MgrId ) VALUES ( 1 , 'Manoj' , NULL ); INSERT INTO Employees ( EmpId ,EmpName ,MgrId ) VALUES ( 2 , 'Yogesh' ,1 ); INSERT INTO Employees ( EmpId ,EmpName ,MgrId ) VALUES ( 3 , 'Ajay' , '2' ); INSERT INTO Employees ( EmpId ,EmpName ,MgrId ) VALUES ( 4 , 'Vijay' , '3' ); INSERT INTO Employees ( EmpId ,EmpName ,MgrId ) VALUES ( 5 , 'Vinay' , '4' ); INSE...