public PostTagResponse Put(PostTagRequest request) { // TODO: implement PUT return new PostTagResponse { Data = request.Id, }; }
public PostTagResponse Put(PostTagRequest request) { // TODO: implement PUT return(new PostTagResponse { Data = request.Id, }); }
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)); }
/// <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 }; }
/// <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 }); }
PostTagResponse ITagService.Update(PostTagRequest request) { return Put(request); }
PostTagResponse ITagService.Update(PostTagRequest request) { return(Put(request)); }