I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component public class AllViewComponent : ViewComponent { private readonly UserManager<ApplicationUser> _userManager; public AllViewComponent(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<IViewComponentResult> InvokeAsync() { List<StudentViewModel> allUsers = new List<StudentViewModel>(); var items = await _userManager.Users.ToListAsync(); foreach (var item in items) { allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email }); }
SQL Server management studio needs to connect to a server to perform any query with it. The article will describe about to customize the result set using sql programming.
The management at Adventure Works. Inc. wants to view a report that displays the employee ID, designation, and age of the employees who are working as a marketing manager or a marketing specialist. The data should be displayed in uppercase. The employee details are stored in the Employee table in the Adventure Works database.
To solve the problem, programmer need to perform the following tasks:
Type the following query in the Query Editor window of the Microsoft SQL Server Management Studio window:
SELECT BusinessEntityID, upper (JobTitle) As
Designation,datediff (yy, Birthdate, getdate ( )) As Age
FROM HumanResources.Employee WHERE JobTitle='Marketing Manager'
OR JobTitle ='Marketing Specialist'
The management at Adventure Works. Inc. wants to view a report that displays the employee ID, designation, and age of the employees who are working as a marketing manager or a marketing specialist. The data should be displayed in uppercase. The employee details are stored in the Employee table in the Adventure Works database.
To solve the problem, programmer need to perform the following tasks:
Creating a Query
To display the age of the employees, you need to use the datediff function to calculate the difference between their birth date and the current date. In addition, to retrieve the data for a marketing manager or a marketing specialist, you need to use the OR logical operator.Type the following query in the Query Editor window of the Microsoft SQL Server Management Studio window:
SELECT BusinessEntityID, upper (JobTitle) As
Designation,datediff (yy, Birthdate, getdate ( )) As Age
FROM HumanResources.Employee WHERE JobTitle='Marketing Manager'
OR JobTitle ='Marketing Specialist'
Comments
Post a Comment