public async Task <bool> EmailOlustur(EmailAddViewModel model) { var result = false; var emaildata = new EPostalar { AdSoyad = model.AdSoyad, Eposta = model.Eposta, Konu = model.Konu, Mesaj = model.Mesaj, Telefon = model.Telefon, EmailTarih = DateTime.Now, SiteId = user.SiteId }; context.EPostalar.Add(emaildata); var sonuc = await context.SaveChangesAsync(); if (sonuc > 0) { result = true; ProjeHub.GetEmailData(); } else { result = false; } return(result); }
public async Task <ActionResult> EmailOlustur(EmailAddViewModel model) { var data = await emailService.EmailOlustur(model); return(Json(data, JsonRequestBehavior.AllowGet)); }