public async Task <IHttpActionResult> CreateAsync([FromBody] ItemCreate itemCreate)
        {
            #region
            //TODO Criar um BaseController para obter o usuário do token;

            //var context = HttpContext.Current.Request.GetOwinContext();
            //var User = context.Authentication.User;
            //var claims = User.Claims;
            //var claim = claims.FirstOrDefault(x => x.Type == "UserId");
            //var userValue = claim.Value.ToInt32();

            //var user = 1;
            #endregion

            var user = 1;

            var validationResults = new ItemCreateValidator().Validate(itemCreate);
            if (!validationResults.IsValid)
            {
                return(this.BadRequest(string.Join(" , ", validationResults.Errors)));
            }

            var itemEntity = itemCreate.ToEntity();

            var createdItem = await Task.Run(() => _appService.Create(itemEntity, user));

            var itemRead = TypeAdapter.Adapt <ItemEntity, ItemRead>(createdItem);

            return(this.Ok(itemRead));
        }
        public async Task <IHttpActionResult> UpdateAsync([FromBody] ItemCreate itemCreate, [FromUri] int id)
        {
            //It does not allow activate item by this method

            var userId = 1;

            //var itemEntity = TypeAdapter.Adapt<ItemCreate, ItemEntity>(item);
            var itemEntity = itemCreate.ToEntity();

            itemEntity.Id = id;

            var updItem = await Task.Run(() => _appService.Update(itemEntity, userId));

            var readItems = TypeAdapter.Adapt <ItemEntity, ItemRead>(updItem);

            return(this.Ok(readItems));
        }