receiving diffent list from domainı have a business project . ı use entity framework. ı have a method in domainservice which receive company names
when ı was load information with loadoperation<tEntity>
for example ı have two rows informaiton in domain method .rows diffent,but in to code side entity have two rows but rows are same
ı cant find why??
code side-----
ctx.Load(ctx.GetifrmgridQuery(prno)).Completed += (re, fg) =>
{
List<ihtiyacfirmaPOCO> lfirma = new List<ihtiyacfirmaPOCO>();
LoadOperation<ifrmPOCO> rslt = re as LoadOperation<ifrmPOCO>;
ihtiyacfirmagrid.ItemsSource = rslt.Entities.ToList();
var itm = ihtiyacfirmagrid.ItemsSource;
ihtiyacfirmagrid.ItemsSource =null;
ihtiyacfirmagrid.ItemsSource = itm;
};
domain side---
[Query]
public IQueryable<ifrmPOCO> Getifrmgrid(intprno)
{
List<ifrmPOCO> flist = new List<ifrmPOCO>();
List<ihtiyacfirma2POCO> flist2 = new List<ihtiyacfirma2POCO>();List<ihtiyacfirma2POCO> flist3 = new List<ihtiyacfirma2POCO>();
flist = (from q in ObjectContext.STN_ProfilFirma
where q.PF_PNo == prno
select new ifrmPOCO{
IF_FKod1 = q.PF_FirmaKodu,
}).ToList();
foreach (ifrmPOCO itemf in flist)
{
string frm = Convert.ToString(itemf.IF_FKod1);
flist2 = (from a in ObjectContext.STN_MUHANASQL
where a.MUH_KOD == frm
select new ihtiyacfirma2POCO{
IF_FirmaAdi = a.MUH_ADI,
}).ToList();
flist.Where(w => w.IF_FKod1 == itemf.IF_FKod1).First().IF_FirmaAdi = flist2.First().IF_FirmaAdi.ToString();
}
return
flist.AsQueryable();
}
Answers & Comments...