I have an interface like what u see below and I want it to return me a Property Called "ProductionCostId" which has a type of 'int' from a table in the database
int Get(Guid productionLineId, string productionCode)
In the implementation as you can see I want to get this value from a child entity called "ProductionAssignmetnt"
public int Get(Guid productionLineId, string productionCode)
{
return GetAll()
.Where(x => x.ProductionAssignments
.Where(x => x.ProductionLine.Id == productionLineId && x.ProductionCode == productionCode)
.Select(x => x.ProductionCostId);
}
But I dont know how to get this int value