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

            this.OnTipoInsumoUpdated(newItem);
            this.context.TipoInsumos.Update(newItem);
            this.context.SaveChanges();

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

            this.OnTipoInsumoCreated(item);
            this.context.TipoInsumos.Add(item);
            this.context.SaveChanges();

            return(Created($"odata/Agriculturebd/TipoInsumos/{item.Id}", item));
        }
 partial void OnTipoInsumoUpdated(Models.Agriculturebd.TipoInsumo item);