Exemplo n.º 1
0
        public IActionResult Create([FromBody]  RealizationItem realizationItem)
        {
            _context.Add(realizationItem);

            _context.SaveChanges();
            return(CreatedAtRoute("GetRealizationItem", new { id = realizationItem.Id }, realizationItem));
        }
Exemplo n.º 2
0
        public IActionResult Create()
        {
            Objective objective = new Objective();

            objective.Category = new Category {
                Id = -1
            };
            _context.Add(objective);
            _context.SaveChanges();
            return(CreatedAtRoute("GetObjective", new { id = objective.Id }, objective));
        }