private void InitializeFields() { this.firstUserContactFormEntry = new ContactFormEntry { FirstName = "Stanislav", LastName = "Stoyanov", Email = "*****@*****.**", Subject = "I have a question", Content = "I have to ask you something connected with the system.", }; this.firstAdminContactFormEntry = new AdminContactFromEntry { FullName = "Administrator fullname", Email = "*****@*****.**", Subject = "My answer to your question", Content = "Feel free to ask any other questions about the system.", }; }
public async Task SendContactToUser(SendContactInputModel sendContactInputModel) { var adminContactFormEntry = new AdminContactFromEntry { FullName = sendContactInputModel.FullName, Email = sendContactInputModel.Email, Subject = sendContactInputModel.Subject, Content = sendContactInputModel.Content, }; await this.adminContactsRepository.AddAsync(adminContactFormEntry); await this.adminContactsRepository.SaveChangesAsync(); await this.emailSender.SendEmailAsync( GlobalConstants.SystemEmail, sendContactInputModel.FullName, sendContactInputModel.Email, sendContactInputModel.Subject, sendContactInputModel.Content); }