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 }); }
- The details of the sub-problem solutions are available in advance in the form of bottom level modules.
- The individual sub-problem solutions are designed with great details.
- The main solution can be planned later depending on the available sub-task solutions.
- The main solution is used to link all the sub-problem solutions.
- The sub-solutions obtained are simple
- A complex main module is designed later using these simpler solutions.
- This technique is more general and code are reusable.
- This technique simplifies maintenance and the new features can be added easily.
- This decision of the final solution can be delayed to make it more effective for implementation.
- Testing in this case is simple and test cases can be designed very easily.
Comments
Post a Comment