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

            this.OnLoteUpdated(newItem);
            this.context.Lotes.Update(newItem);
            this.context.SaveChanges();

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

            this.OnLoteCreated(item);
            this.context.Lotes.Add(item);
            this.context.SaveChanges();

            return(Created($"odata/Agriculturebd/Lotes/{item.Id}", item));
        }
 partial void OnLoteUpdated(Models.Agriculturebd.Lote item);
 partial void OnLoteDeleted(Models.Agriculturebd.Lote item);