public ActionResult Contact(ContactModel model) { if (ModelState.IsValid) { ContactMessage msg = _mapper.Map <ContactModel, ContactMessage>(model); Result result = _contactSrv.AddContactMessage(msg); // TODO: move to a seperate class with css class definition TempData["Msg"] = $"Wiadomość wysłana pomyślnie! Otrzymała ID = {result.Message}"; } return(RedirectToAction("Contact")); }
public ActionResult <MessageModel> getbyid(MessageModel messageModel) { var result = _contactService.AddContactMessage(messageModel); return(Ok(result)); }