Entity framework left join
var query = (from u in _StyleSizeRepository.GetAll()
join p in _buyCentralRepository.GetAll() on u.Barcode equals p.BarCode into gj
from x in gj.DefaultIfEmpty()
select new StyleSize()
{
Barcode = u.Barcode,
sBarcode = u.sBarcode,
BTID = u.BTID,
BTName = u.BTName,
BalQty = (x == null ? 0 : x.balQty)
});
http://stackoverflow.com/questions/5537995/entity-framework-left-join
join p in _buyCentralRepository.GetAll() on u.Barcode equals p.BarCode into gj
from x in gj.DefaultIfEmpty()
select new StyleSize()
{
Barcode = u.Barcode,
sBarcode = u.sBarcode,
BTID = u.BTID,
BTName = u.BTName,
BalQty = (x == null ? 0 : x.balQty)
});
http://stackoverflow.com/questions/5537995/entity-framework-left-join
Comments
Post a Comment