コード例 #1
0
        /// <summary>
        /// Adds the update.
        /// </summary>
        /// <param name="hashTagDescriptionDto">The hash tag description dto.</param>
        /// <returns>TblHashTagDescriptionDto added/updated object</returns>
        private IHttpActionResult AddUpdate(TblHashTagDescriptionDto hashTagDescriptionDto)
        {
            var result = new ResultMessage <TblHashTagDescriptionDto>();

            try
            {
                result = this.hashTagDescriptionService.SaveOrUpdate(hashTagDescriptionDto, this.UserId);
            }
            catch (Exception ex)
            {
                this.LoggerService.LogException(ex);
                result.Messages.Add(new Message(null, ex.Message));
            }

            return(this.CreateCustomResponse(result));
        }
コード例 #2
0
 public IHttpActionResult Update([FromBody] TblHashTagDescriptionDto hashTagDescriptionDto, long id)
 {
     hashTagDescriptionDto.Id = id;
     return(this.AddUpdate(hashTagDescriptionDto));
 }
コード例 #3
0
 public IHttpActionResult Add([FromBody] TblHashTagDescriptionDto hashTagDescriptionDto)
 {
     return(this.AddUpdate(hashTagDescriptionDto));
 }