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 }); }
By using the Entity Framework you can can communicate with the Sql Server. In which we have two approaches i.e "Code First" and "Model First". But, In this article, I will explain you how to install Entity Framework from console and Solutions:
Install From Console:
1. Select "Package Manager Console" by the following path :
Tools -> NuGet Package Manager--> Package Manager Console
Note : Before type the command in command line, must to ensure your internet connection.
Type command in Command Line:
PM> Install-Package EntityFramework
Install From Solution:
1. Select "Manage Nuget Packages for Solutions... " by the following path :
Tools -> NuGet Package Manager--> Manage Nuget Packages for Solutions...
Note : Before type the command in command line, must to ensure your internet connection.
Search Entity Framework in search bar, which reside in right side bar.
Install From Console:
1. Select "Package Manager Console" by the following path :
Tools -> NuGet Package Manager--> Package Manager Console
Note : Before type the command in command line, must to ensure your internet connection.
Type command in Command Line:
PM> Install-Package EntityFramework
Install From Solution:
1. Select "Manage Nuget Packages for Solutions... " by the following path :
Tools -> NuGet Package Manager--> Manage Nuget Packages for Solutions...
Note : Before type the command in command line, must to ensure your internet connection.
Search Entity Framework in search bar, which reside in right side bar.
Comments
Post a Comment