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");

Mounnad MohamedRank #1,633 · 945 reputationPosted Sep 16, 2019, 2:19 AM EDT
Denmark PusoRank #7,130 · 248 reputationPosted Sep 16, 2019, 5:03 PM EDT
Ronika JencyRank #770 · 3K reputationPosted Sep 16, 2019, 9:23 PM EDT
Jaimin ShethiyaRank #177 · 13.7K reputationPosted Sep 23, 2019, 1:57 AM EDT