public IServiceResults<bool> Edit(YearEvents model)
 {
     _yearEvents.Attach(model);
     _uow.Entry(model).State = EntityState.Modified;
     var result = _uow.SaveChanges();
     return new ServiceResults<bool>()
     {
         IsSuccessfull = result.ToBool(),
         Message = result.ToMessage(BusinessMessage.Error),
         Result = result.ToBool()
     };
 }
        public IServiceResults<int> Add(YearEvents model)
        {
            _yearEvents.Add(model);
            var saveResult = _uow.SaveChanges();

            return new ServiceResults<int>
            {
                IsSuccessfull = saveResult.ToBool(),
                Message = saveResult.ToMessage(BusinessMessage.Error),
                Result = model.YearEventsId
            };
        }
 public virtual ActionResult Edit(YearEvents model)
 {
     if (!ModelState.IsValid)
     {
         return View(model);
     }
     var result = _yearEventsService.Edit(model);
     if (!result.IsSuccessfull)
     {
         this.NotificationController().Notify(result.Message, NotificationStatus.Error);
         return View(model);
     }
     return RedirectToAction(MVC.YearEvents.ActionNames.Add, MVC.YearEvents.Name);
 }
 private void _OneYearEvents()
 {
     YearEvents?.Invoke();
 }