Exemple #1
0
 public async Task DeleteProductionLineAsync(int productionLineId)
 {
     await _productionLineRepository.Delete(new ProductionLine()
     {
         Id = productionLineId
     });
 }
Exemple #2
0
 public async Task DeleteProductionLineById(Guid id)
 {
     if (!_productionLineRepository.Exists(id).Result)
     {
         throw new KeyNotFoundException();
     }
     await _productionLineRepository.Delete(id);
 }
Exemple #3
0
        public ActionResult <ProductionLine> DeleteProductionLine(int id)
        {
            ProductionLine productionLine = _productionLineRepository.GetBy(id);

            if (productionLine == null)
            {
                return(NotFound());
            }
            _productionLineRepository.Delete(productionLine);
            _productionLineRepository.SaveChanges();
            return(productionLine);
        }
 public ActionResult <ProductionLine> DeleteProductionLine(int id)
 {
     return(Ok(_IProductionLineRepository.Delete(id)));
 }