Esempio n. 1
0
 public PostTagResponse Put(PostTagRequest request)
 {
     // TODO: implement PUT
     return new PostTagResponse
     {
         Data = request.Id,
     };
 }
Esempio n. 2
0
 public PostTagResponse Put(PostTagRequest request)
 {
     // TODO: implement PUT
     return(new PostTagResponse
     {
         Data = request.Id,
     });
 }
Esempio n. 3
0
        public async Task <ActionResult> UpdateTag([FromBody] PostTagRequest request)
        {
            var tag = _dbContext.Tags.Single(t => t.Id == request.Id);

            tag.Name = request.Name;
            _dbContext.Tags.Update(tag);
            await _dbContext.SaveChangesAsync();

            return(Ok(tag));
        }
Esempio n. 4
0
        /// <summary>
        /// Creates a new tag.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>
        ///   <c>PostTagsResponse</c> with a new tag id.
        /// </returns>
        public PostTagResponse Post(PostTagRequest request)
        {
            var result =
                tagService.Put(
                    new PutTagRequest
                        {
                            Data = request.Data,
                            User = request.User
                        });

            return new PostTagResponse { Data = result.Data };
        }
Esempio n. 5
0
        /// <summary>
        /// Creates a new tag.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>
        ///   <c>PostTagsResponse</c> with a new tag id.
        /// </returns>
        public PostTagResponse Post(PostTagRequest request)
        {
            var result =
                tagService.Put(
                    new PutTagRequest
            {
                Data = request.Data,
                User = request.User
            });

            return(new PostTagResponse {
                Data = result.Data
            });
        }
Esempio n. 6
0
 PostTagResponse ITagService.Update(PostTagRequest request)
 {
     return Put(request);
 }
Esempio n. 7
0
 PostTagResponse ITagService.Update(PostTagRequest request)
 {
     return(Put(request));
 }