public async Task <IActionResult> SaveReply(TReply reply) { if (ModelState.IsValid) { await _comReplyRepo.SaveReply(reply); await _mailService.MailForReply(reply); return(RedirectToAction("Details", "Blog", new { @id = reply.EntryId })); } ModelState.Clear(); return(RedirectToAction("Details", "Blog", new { @id = reply.EntryId })); }
public async Task <bool> SaveReply(TReply reply) { try { _context.Add(reply); await _context.SaveChangesAsync(); return(true); } catch { return(false); } }
public async Task <bool> MailForReply(TReply reply) { string header = await FindEntryHeader(reply.EntryId); try { await ConfigureMail(); MailMessage message = new MailMessage(reply.Email, mailInfo.Mail2, reply.Name + " web sitende " + header + " başlıklı yazının " + reply.CommentId + " no'lu yorumuna cevap verdi." , reply.Email + " adresinden gelen cevap:<br/>" + reply.ReplyText); message.IsBodyHtml = true; emailClient.Send(message); return(true); } catch { return(false); } }
public async Task Reply(TReply reply) { await Channel.SendMsg(Converter(reply)).CAF(); }
public static Flow <TQuery, TReply> Create(TQuery query, TReply, reply) where /* constraint */ { return(new Flow <TQuery, TReply> (query, reply)); }