Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Child tables lookup is not loading using Lazy loading

$
0
0

Hi,

I have a primary table and secondary table lookup where i will load secondary drop down values based on primary drop down selection. But secondary drop down is not loading when i am using lazy loading technique. 

 List<pr> rs = LookupSingleton.Instance.PReasonLookup
                                       .Where(x => x.StartDate != null))
                                       .ToList();

                foreach (Preasonclass pr in rs)
                {
                   List<SecondaryReason> secondaryReasons = pr.SecondaryReasons  -- getting error in this line
                                              .Where(x => x.StartDate != null))
                                              .OrderBy(x => x.Description).ToList();
                }

Can some on please advice ?

Thanks


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>