ill try to get the all ID with status of "Picked-up" in other table. im newbie here im using c# asp.net mvc
this is my code any suggest on how to do. thanks in advance
- var package = _packageService.GetAll().Where(x => x.Status == "Picked-up");
-
- var shipmentItem = new ShipmentItems
- {
- ShipmentId = model.ShipmentId
- };
-
- if (package != null)
- {
- shipmentItem.PackageId = package.Id;
- }
-
- _shipmentItemService.Add(shipmentItem);
- return RedirectToAction("addshipmentitem");