Getting only Male employees top 5 salary
Var result=db.Employees.where(x=>x.Gender=="Male")
.OrderByDescending(x=>x.salary)
.Take(5);
1) How to convert rows to columns in sql server?
A) CREATE table #yourtable
([Id] int, [Value] varchar(6), [ColumnName] varchar(13));
INSERT INTO #yourtable
([Id], [Value], [ColumnName])
VALUES
(1, 'John', 'FirstName'),
(2, '2.4', 'Amount'),
(3, 'ZH1E4A', 'PostalCode'),
(4, 'Fork', 'LastName'),
(5, '857685', 'AccountNumber');
select Firstname, Amount, PostalCode, LastName, AccountNumber
from
(
select value, columnname
from #yourtable
) d
pivot
(
max(value)
for columnname in (Firstname, Amount, PostalCode, LastName,
AccountNumber)
) piv;
2) In how many ways to configure routes in mvc?
3) Can we access page from url without action method?
4) Dependency injection?
5) How many ways to connect database from Entity framework?
6) When to use code first and data base first approach?
7) How can we select 2nd li item in jquery?
A) $( "ul li:nth-child(2)" )
8) Which is faster Jquery or Javascript?
9) MVC page life cycle?
10) Design patterens?
11) How can we increase the performence of application?
12) Attribute routing in MVC?
13) Diff between Authentication and Autherisation?
14) What are the authentication mods are there?
15) Custom Helper in MVC?
No comments:
Post a Comment