public List <Field> GetFieldsAppliedWithManure(ManureStorageSystem manureStorageSystem) { var farmManureIds = GetFarmManureIds(manureStorageSystem); var appliedFields = GetFieldsAppliedWithFarmManure(farmManureIds); return(appliedFields); }
public List <int> GetFarmManureIds(ManureStorageSystem manureStorageSystem) { if (manureStorageSystem == null) { return(new List <int>()); } var farmManureIds = FarmManures .Where(fm => fm.SourceOfMaterialStoredSystemId == manureStorageSystem.Id) .Select(fm => fm.Id).ToList(); return(farmManureIds); }