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 }); }
Renaming a User-Defined Database
After creating a user-defined database in SQL server, programmer can rename a database whenever required. Only a system administrator or the database owner can rename a database. The sp_renamedb stored procedure is used to rename a database. The syntax of the sp_renamedb statement is:Sp_renamedb old_database_name, new_database_name
Where
- old_database_name is the current name of the database
- new_database_name is the new name of the database
Sp_renamedb Personnel Personnel1
Dropping a User-Defined Database
Programmer can delete a database when it is no longer required. This causes all the database files and data to be deleted. Only the users with sysadmin role and the database owner have the permissions to delete a database. The syntax of the DROP DATABASE statement is:DROP DATABASE database_name
Where
Database_name is the name of the database.
The following SQL query deletes the Employee database:
DROP DATABASE Employee
Programmer cannot delete a system-defined database. Programmer can rename or delete a database using the Object Explorer window by right-clicking the Databases folder and selecting the Rename or Delete option from the shortcut menu.Create User-Defined Database
Comments
Post a Comment