public async Task <IDataResult <IList <BillOfMaterialsComponent> > > GetListByOrderIdAsync(int orderId) { var bom = await _bomDao.GetAsync(bom => bom.Id == orderId); var bomComps = await _bomComponentDao.GetListAsync(bomComp => bomComp.BomId == bom.Id); return(new SuccessDataResult <IList <BillOfMaterialsComponent> >(bomComps)); }
public async Task <IDataResult <BillOfMaterials> > GetByIdAsync(int id) { var component = await _bomDao.GetAsync(c => c.Id == id); return(new SuccessDataResult <BillOfMaterials>(component)); }