public ActionResult AddPictureGalery(PictureGaleryModel model) { var PictureGalery = new PictureGalery(); if (ModelState.IsValid) { PictureGalery.Description = model.Description; PictureGalery.InsertDate = DateTime.Now; PictureGalery.InsertUserId = CustomMembership.CurrentUser().Id; PictureGalery.IsActive = model.IsActive; PictureGalery.Name = model.Name; try { _PictureGaleryService.Insert(PictureGalery); _uow.SaveChanges(); messagesForView.Clear(); messagesForView.Add("İşlemi başarılı!"); Success(messagesForView); return RedirectToAction("Index"); } catch (Exception ex) { messagesForView.Clear(); messagesForView.Add("İşlem başarısız!"); messagesForView.Add(ex.Message); messagesForView.Add(ex.InnerException.Message); Error(messagesForView); } } return View(model); }
public void Insert(PictureGalery PictureGalery) { _PictureGaleryRepository.Insert(PictureGalery); }
public void Update(PictureGalery PictureGalery) { _PictureGaleryRepository.Update(PictureGalery); }
public void Delete(PictureGalery PictureGalery) { _PictureGaleryRepository.Delete(PictureGalery); }