コード例 #1
0
        public async Task <IHttpActionResult> Get(string id)
        {
            var decodedId = id.FromEncodedId();
            var post      = await _dbContext.Posts.FindAsync(decodedId);

            if (post == null || post.DeletedAt != null)
            {
                return(NotFound());
            }

            return(OkData(await _dtoService.CreateAsync <Post, DtoPost>(post)));
        }