public IActionResult PutDepartamento(Int64 key, [FromBody] Models.Agriculturebd.Departamento newItem)
        {
            if (newItem == null || newItem.Id != key)
            {
                return(BadRequest());
            }

            this.OnDepartamentoUpdated(newItem);
            this.context.Departamentos.Update(newItem);
            this.context.SaveChanges();

            return(new NoContentResult());
        }
        public IActionResult Post([FromBody] Models.Agriculturebd.Departamento item)
        {
            if (item == null)
            {
                return(BadRequest());
            }

            this.OnDepartamentoCreated(item);
            this.context.Departamentos.Add(item);
            this.context.SaveChanges();

            return(Created($"odata/Agriculturebd/Departamentos/{item.Id}", item));
        }
 partial void OnDepartamentoUpdated(Models.Agriculturebd.Departamento item);