public ActionResult <EstimatedShipping> Create(EstimatedShipping estimatedShipping) { estimatedShipping.EstimatedDate = DateTime.Now.Date; estimatedShipping.EstimatedDate = estimatedShipping.EstimatedDate.AddDays(4); _estimatedShippingService.Create(estimatedShipping); return(CreatedAtRoute("GetEstimatedShipping", new { id = estimatedShipping.Id.ToString() }, estimatedShipping)); }
public IActionResult Update(string id, EstimatedShipping estimatedShippingIn) { var estimatedShipping = _estimatedShippingService.Get(id); if (estimatedShipping == null) { return(NotFound()); } _estimatedShippingService.Update(id, estimatedShippingIn); return(NoContent()); }
public void Remove(EstimatedShipping estimatedShippingIn) => _estimatedShipping.DeleteOne(estimatedShipping => estimatedShipping.Id == estimatedShippingIn.Id);
public void Update(string id, EstimatedShipping estimatedShippingIn) => _estimatedShipping.ReplaceOne(estimatedShipping => estimatedShipping.Id == id, estimatedShippingIn);
public EstimatedShipping Create(EstimatedShipping estimatedShipping) { _estimatedShipping.InsertOne(estimatedShipping); return(estimatedShipping); }