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 }); }
Special Operation on linked lists:
Reversing the ordered Singly Linked List:
In order to reverse the ordered singly linked list, the root must point to the last node of the list. The first node’s address must be copied to the link of second node. Similarly the address of each node is copied in the link of the next node. It works like exchanging the links of each node with the address of the previous node. The algorithm is simple and self-explanatory.
The same is given as follows:
REVERSELL (ROOT)
FIRST<--ROOT [To store the first node’s address]
PPTR<--ROOT [To store the address in link]
NPTR<--ROOT-->LINK [To store address of previous node]
Repeat While NPTR< >NULL
ROOT<--NPTR
NPTR<--NPTR-->LINK
ROOT-->LINK<--PPTR
PPTR<--ROOT
[End of while]
FIRST-->LINK<--NULL [To make first node as last]
Return ROOT
Exit.
Reversing the ordered Singly Linked List:
In order to reverse the ordered singly linked list, the root must point to the last node of the list. The first node’s address must be copied to the link of second node. Similarly the address of each node is copied in the link of the next node. It works like exchanging the links of each node with the address of the previous node. The algorithm is simple and self-explanatory.
The same is given as follows:
REVERSELL (ROOT)
FIRST<--ROOT [To store the first node’s address]
PPTR<--ROOT [To store the address in link]
NPTR<--ROOT-->LINK [To store address of previous node]
Repeat While NPTR< >NULL
ROOT<--NPTR
NPTR<--NPTR-->LINK
ROOT-->LINK<--PPTR
PPTR<--ROOT
[End of while]
FIRST-->LINK<--NULL [To make first node as last]
Return ROOT
Exit.
Comments
Post a Comment