private bool CheckIfContactDataAlreadyExists(ContactDataDetailModel contactDataDetailModel) { var result = false; var exisitngContactData = _contactData.GetAll(); foreach (ContactData c in exisitngContactData) { result = c.FirstName.Equals(contactDataDetailModel.FirstName) && c.LastName.Equals(contactDataDetailModel.LastName) && c.PLZ == contactDataDetailModel.PLZ && c.EMail.Equals(contactDataDetailModel.Email) && c.TelephonNumber.Equals(contactDataDetailModel.Telephonnumber); if (result) { break; } } return(result); }
public IActionResult Contacts() { var model = _contactData.GetAll(); return(View(model)); }