public bool UpdateWebinar(WebinarsVM webinarsVM)
 {
     try
     {
         var webinar = _mapper.Map <Webinars>(webinarsVM);
         return(_webinarRepo.UpdateWebinar(webinar).Result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #2
0
 public ResultsVM UpdateWebinarDetails([FromBody] WebinarsVM webinarsVM)
 {
     try
     {
         var response = _webinarService.UpdateWebinar(webinarsVM);
         return(new ResultsVM(response, Resources.Enums.StatusCodes.Success, null));
     }
     catch (Exception ex)
     {
         return(new ResultsVM(null, Resources.Enums.StatusCodes.Success, "Error in updating webinar price"));
     }
 }
Example #3
0
        public ResultsVM Post([FromBody] WebinarsVM webinar)
        {
            try
            {
                var response = _webinarService.AddWebinar(webinar);

                return(new ResultsVM(response, Resources.Enums.StatusCodes.Success, null));
            }
            catch (Exception ex)
            {
                return(new ResultsVM(null, Resources.Enums.StatusCodes.InternalServerError, "Error in adding new webinar"));
            }
        }
 public bool AddWebinar(WebinarsVM webinarVM)
 {
     try
     {
         var webinar = _mapper.Map <Webinars>(webinarVM);
         webinar.Id = Guid.NewGuid();
         var response = _webinarRepo.AddWebinar(webinar);
         return(response.Result);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }