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 }); }
Understanding creation of circular linked list
Initially,
One node with information ‘6’ is added to the circular linked list. Then the list becomes,
Another node with information ‘16’ is added to the circular linked list. Then the list become,
Similarly when two more nodes are added with information ‘1’ and ‘61’, the list become,
Traversing in circular Linked List:
To visit all the node of a circular linked list, start from the ROOT and visit first element. Then with the help of link field visit the second element, similarly visit all the elements. The last node is recognized by the ROOT address in its link field. So, set a pointer variable PTR with ROOT. Process PTR-->INFO and update PTR by LINK of PTR i.e.PTR<--PTR-->LINK. Repeat till the PTR-->LINK is equal to ROOT.
Algorithm is as follows:
TRAVERSECLL (ROOT)
PTR<--ROOT
If PTR = NULL Then:
Write: ‘Empty Circular linked list’: Exit.
[End of If]
Repeat While TRUE
Apply process to PTR-->INFO
If PTR-->LINK = ROOT Then:
Break. [To break the infinite loop]
[End of If]
PTR<--PTR-->LINK
[End of while]
Exit.
Algorithm to print the contents of a linked list:
TRAVERSELL (ROOT)
PTR<--ROOT
If PTR = NULL Then:
Write: ‘Empty Circular linked list’; Exit.
[End of If]
Repeat While TRUE
Write: PTR-->INFO
If PTR-->LINK = ROOT Then:
Break. [To break the infinite loop]
[End of If]
PTR<--PTR-->LINK
[End of while]
Exit.
Initially,
One node with information ‘6’ is added to the circular linked list. Then the list becomes,
Similarly when two more nodes are added with information ‘1’ and ‘61’, the list become,
Traversing in circular Linked List:
To visit all the node of a circular linked list, start from the ROOT and visit first element. Then with the help of link field visit the second element, similarly visit all the elements. The last node is recognized by the ROOT address in its link field. So, set a pointer variable PTR with ROOT. Process PTR-->INFO and update PTR by LINK of PTR i.e.PTR<--PTR-->LINK. Repeat till the PTR-->LINK is equal to ROOT.
Algorithm is as follows:
TRAVERSECLL (ROOT)
PTR<--ROOT
If PTR = NULL Then:
Write: ‘Empty Circular linked list’: Exit.
[End of If]
Repeat While TRUE
Apply process to PTR-->INFO
If PTR-->LINK = ROOT Then:
Break. [To break the infinite loop]
[End of If]
PTR<--PTR-->LINK
[End of while]
Exit.
Algorithm to print the contents of a linked list:
TRAVERSELL (ROOT)
PTR<--ROOT
If PTR = NULL Then:
Write: ‘Empty Circular linked list’; Exit.
[End of If]
Repeat While TRUE
Write: PTR-->INFO
If PTR-->LINK = ROOT Then:
Break. [To break the infinite loop]
[End of If]
PTR<--PTR-->LINK
[End of while]
Exit.
Comments
Post a Comment