public IResponseDTO EditWorkshopNotifications(WorkshopNotificationsVM model)
        {
            try
            {
                var DbWorkshopNotifications = _mapper.Map <WorkshopNotifications>(model);
                var entityEntry             = _WorkshopNotificationsRepositroy.Update(DbWorkshopNotifications);


                int save = _unitOfWork.Commit();

                if (save == 200)
                {
                    _response.Data     = model;
                    _response.IsPassed = true;
                    _response.Message  = "Ok";
                }
                else
                {
                    _response.Data     = null;
                    _response.IsPassed = false;
                    _response.Message  = "Not saved";
                }
            }
            catch (Exception ex)
            {
                _response.Data     = null;
                _response.IsPassed = false;
                _response.Message  = "Error " + string.Format("{0} - {1} ", ex.Message, ex.InnerException != null ? ex.InnerException.FullMessage() : "");
            }

            return(_response);
        }
Пример #2
0
        public IResponseDTO postWorkshopNotifications(WorkshopNotificationsVM WorkshopNotificationsVM)
        {
            var depart = _WorkshopNotificationsServices.PostWorkshopNotifications(WorkshopNotificationsVM);

            return(depart);
        }
Пример #3
0
        public IResponseDTO UpdateWorkshopNotifications(WorkshopNotificationsVM WorkshopNotificationsVM)
        {
            var depart = _WorkshopNotificationsServices.EditWorkshopNotifications(WorkshopNotificationsVM);

            return(depart);
        }
Пример #4
0
        public IResponseDTO RemoveWorkshopNotifications(WorkshopNotificationsVM WorkshopNotificationsVM)
        {
            var depart = _WorkshopNotificationsServices.DeleteWorkshopNotifications(WorkshopNotificationsVM);

            return(depart);
        }