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

Comments

Popular posts from this blog

Easy Ui Jquery easyui-textbox change onChange event

Provision AWS EC2 Instance and RDS with Terraform, and Deploy Spring Boot App to EC2 Instance via GitHub Action Pipeline

npm install gets stuck at fetchMetadata