public static List<Contact> CreateContacts() { var random = new Random(); List< Contact > contacts = new List<Contact>(); for (int i = 0; i < 25; i++) { string first = FirstName[random.Next(FirstName.Count - 1)]; string last = LastName[random.Next(LastName.Count - 1)]; string email = first + "." + last + "@nackademin.se"; Contact contact = new Contact() {FirstName = first, LastName = last, Email = email}; contacts.Add(contact); } return contacts; }
public ContactPage(Contact contact) { _Contact = new ContactViewModel(contact); InitializeComponent(); BindingContext = _Contact; }