Пример #1
0
        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);
        }
Пример #2
0
        public async Task <ActionResult> EmailOlustur(EmailAddViewModel model)
        {
            var data = await emailService.EmailOlustur(model);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }