public async Task <ActionResult> AddTree([FromBody] TreeCreationDto tree)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest("Invalid Model State"));
            }

            var addTree = _mapper.Map <Tree>(tree);
            await _ctx.Trees.AddAsync(addTree);

            await _ctx.SaveChangesAsync();

            var newTree = _mapper.Map <TreeGetDto>(addTree);

            return(Ok(new { id = addTree.Id }));
        }
        public async Task <ActionResult> UpdateTree(Guid id, [FromBody] TreeCreationDto treeUpdated)
        {
            var tree = await _ctx.Trees.FindAsync(id);

            if (tree == null)
            {
                return(NotFound());
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            tree.Name = treeUpdated.Name;
            _ctx.Trees.Update(tree);
            await _ctx.SaveChangesAsync();

            return(Ok());
        }