public List <ShipmentAllDTO> GetAll() { var shipmentDTOs = new List <ShipmentAllDTO>(); var shipments = _shipmentRepository.GetAll(); foreach (var shipment in shipments) { var shipmentDto = new ShipmentAllDTO(); shipmentDto.CategoryId = shipment.CategoryId; shipmentDto.CategoryName = shipment.CategoryName; shipmentDto.Address = shipment.Address; shipmentDto.TotalProductsToBeShipped = shipment.TotalProductsToBeShipped; shipmentDTOs.Add(shipmentDto); } return(shipmentDTOs); }
// GET: api/Shipments public IEnumerable <ShipmentsModel> GetShipments() { return(Mapper.Map <IEnumerable <ShipmentsModel> >( _shipmentRepository.GetAll() )); }
public IActionResult Get() { return(Ok(_shipmentRepository.GetAll())); }
private void MainForm_Load(object sender, EventArgs e) { dataGridView1.DataSource = _shipmentRepository.GetAll(); }
public IEnumerable <ShipmentEntity> GetList() { return(_shipmentRepository.GetAll()); }