public JsonResult OnPostCreate(CreateCeremonyGuest command) { var result = _ceremonyGuestApplication.Create(command); var ceremony = _ceremonyApplication.GetDetail(command.CeremonyId); var guests = _ceremonyGuestApplication.GetCeremonyGuests(command.CeremonyId); var guestInfo = _guestApplication.GetGuestsInfo(guests); foreach (var item in guestInfo) { _emailService.SendEmail(ceremony.Title, " جناب آقای دعوتنامه شرکت در در مراسم", item.Email); } return(new JsonResult(result)); }
public IActionResult OnGetEdit(long id) { var ceremony = _ceremonyApplication.GetDetail(id); return(Partial("Edit", ceremony)); }