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 Video Channel : Download all SQL Video
Works only on sorted items. such as
1,2,3,4,5,6 etc
|
Works on sorted as well as unsorted items.
12,4,5,3,2,1 etc
|
Very efficient if the items are sorted
|
Very efficient if the items are less and present in the beginning of
the list. such as
Suppose your list items are :
12,3,4,5,1
and you want to search 12 number then you get beginning in the list.
|
Works well with arrays and not on linked lists.
|
Works with arrays and linked lists.
|
Number of comparisons are less
|
More number of comparisons are required if the items are present in
the later part of the array or its elements are more.
|
Comments
Post a Comment