/// <summary> /// Adds the update. /// </summary> /// <param name="schedulerDto">The scheduler dto.</param> /// <returns> /// Newly added object /// </returns> private IHttpActionResult AddUpdate(TblSchedulerDto schedulerDto) { var result = new ResultMessage <TblSchedulerDto>(); try { result = this.schedulerService.SaveOrUpdate(schedulerDto, this.UserId); } catch (Exception ex) { this.LoggerService.LogException(ex); result.Messages.Add(new Message(null, ex.Message)); } return(this.CreateCustomResponse(result)); }
public IHttpActionResult Update([FromBody] TblSchedulerDto schedulerDto, long id) { schedulerDto.Id = id; schedulerDto.LastExecuted = null; return(this.AddUpdate(schedulerDto)); }
public IHttpActionResult Add([FromBody] TblSchedulerDto schedulerDto) { return(this.AddUpdate(schedulerDto)); }