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 }); }
Introduction
Database table is a collection of "data-column and data-rows". If you want to make table in visual studio 2010 then you must save table using save icon. Also give name of the table, which is related to table data. In Visual Studio 2013 you must to update table after preparing structure.Following some steps for creating Database table in visual studio 2012
Step-1 : Right click on website name in solution explorer
Step-2 : Click Add --> Add New Item
Step-3: Select Sql Server Database
Step-4: Show new pop up window
Step-5: Click "Yes" in Microsoft visual Studio pop
and add Database.mdf file in App_Data folder
Step-6: In Server Explorer Expand "+" icon of database.mdf file
Step-7: Right Click on Tables --> Click Add new Table
Step-8: make Id as IsIdentity column.
Step-9: Right click on id column-->Properties
Step-10: Set Is Identity to "true"
Step-11 : Add new Column to table
Step-12: Before Click on Update button chnage table name
Step-13 : Insert item into table
Step-14 : Right click on Table name in server explorer
Step-15 : Click show table data
Step-16 : Insert item into table
Comments
Post a Comment