@page "/contacts"
@inject NavigationManager NavigationManager
Contacts
@{
var contact = context as Contact;
}
@code {
public List GridData { get; set; } = new List
{
new Contact
{
Id = 1,
FirstName = "Peter",
LastName = "Parker",
NickName = "Spider-Man",
Place = "New York City",
DateOfBirth = new DateTime(2001, 8, 1),
DateCreated = DateTime.Now
},
new Contact
{
Id = 1,
FirstName = "Tony",
LastName = "Stark",
NickName = "Iron Man",
Place = "Malibu",
DateOfBirth = new DateTime(1970, 5, 29),
DateCreated = DateTime.Now
},
new Contact
{
Id = 1,
FirstName = "Bruce",
LastName = "Wayne",
NickName = "Batman",
Place = "Gotham City",
DateOfBirth = new DateTime(1915, 4, 7),
DateCreated = DateTime.Now
}
};
void EditContact(int Id)
{
NavigationManager.NavigateTo($"contacts/edit/{Id}");
}
}