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 }); }
ADO.NET Entity Data Model provides you a better and fast approach for communicating with database objects like Table, Stored Procedure etc. After added it, you have some models (classes ) which is related to tables and context classes. I mean to say that you can access database table directly by using context classes. In the context class, we have some public properties, through these we can retrieve table values. These all such things are related to model first approach , i mean to day that ADO.NET Entity Data model is based on model first approach. Let's start to configure it with the database, you can follow these steps , if you want to configure it: Step-1 : Right Click on your project name , select add new item from the appearing menu. Step-2 : Step-3: Press "OK" to continue. Step-4: Select "EF designer from Database" option in the Entity Data Model wizard. Step-5: Now, press Next to continue in model wizard, select Connection string from