Esempio n. 1
0
 public bool Update(Blog model)
 {
     try
     {
         return(blogDal.Update(model));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public EntityResult Update(Blog model)
 {
     try
     {
         if (_blogDal.Update(model))
         {
             return(new EntityResult("Başarılı", ResultState.Success));
         }
         else
         {
             return(new EntityResult("Hata Oluştu", ResultState.Warning));
         }
     }
     catch (Exception ex)
     {
         return(new EntityResult("Database Hatası " + ex.ToInnestException().Message, ResultState.Error));
     }
 }
Esempio n. 3
0
        public async Task <IActionResult> Update(Blog blog, IFormFile file)
        {
            if (ModelState.IsValid)
            {
                blog.Date = DateTime.Now;
                if (file != null)
                {
                    await UploadImage(blog, file);
                }

                _blogDal.Update(blog);
                TempData["message"] = $"{blog.Title} updated";
                return(RedirectToAction("List"));
            }

            ViewBag.Categories = new SelectList(_categoryDal.GetList(), "Id", "Name");
            return(View(blog));
        }
Esempio n. 4
0
        public DataResponse Update(Blog entity)
        {
            var blog = _blogDal.Update(entity);

            if (blog == null)
            {
                return new DataResponse
                       {
                           Mesaj      = "Blog Duzenlenemedi",
                           Tamamlandi = false,
                       }
            }
            ;
            return(new DataResponse
            {
                Data = blog,
                Tamamlandi = true,
                Mesaj = blog.Baslik + " Baslikli Blog Duzenlendi",
            });
        }
Esempio n. 5
0
 public void Update(Blog blog)
 {
     _blogDal.Update(blog);
 }
Esempio n. 6
0
 public void Update(Blog entity)
 {
     _blogDal.Update(entity);
 }
Esempio n. 7
0
 public Blog Update(Blog blog)
 {
     return(_blogDal.Update(blog));
 }
Esempio n. 8
0
 public IResult Update(Blog entity)
 {
     _blogDal.Update(entity);
     return(new SuccessResult());
 }