AIMS_BD_IATI.DAL.AimsDAL.GetAllFundSources C# (CSharp) Method

GetAllFundSources() public method

Get Managing DPs
public GetAllFundSources ( ) : List
return List
        public List<ExecutingAgencyLookupItem> GetAllFundSources()
        {
            var piList = dbContext.tblProjectInfoes.GroupBy(q => q.FundSourceId).Select(x => x.FirstOrDefault().FundSourceId).ToList();

            var fundSources = (from dp in dbContext.tblFundSources
                                   //where piList.Contains(dp.Id)
                               orderby dp.FundSourceName
                               select new ExecutingAgencyLookupItem
                               {
                                   ExecutingAgencyTypeId = (int)ExecutingAgencyType.DP,
                                   ExecutingAgencyOrganizationTypeId = dp.FundSourceCategoryId,
                                   ExecutingAgencyOrganizationId = dp.Id,
                                   IATICode = dp.IATICode,
                                   Name = dp.FundSourceName,
                               }).ToList();

            return fundSources;
        }