Posted By : Murugan Andezuthu Dharmaratnam
Posted On : 13 December 2014
Keywords : Code4Beginner,Beginner,LINQ if condition,LINQ if condition satisfied

LINQ : If Condition Satisfied

LINQ : if condition satisfied

var query = _ef.web_buffer_view.Select(qr => qr);
            if (part_number != null)
                query = query.Where(wbv => wbv.PART_NUMBER.Contains(part_number));
            if(part_serial_no != null)
                query = query.Where(wbv => wbv.PART_SERIAL_NO.Contains(part_serial_no));
            if (current_location != null)
            query = query.Where(wbv => wbv.CURRENT_LOCATION.Contains(current_location));

            return query;

Murugan Andezuthu Dharmaratnam

Murugan is a technology leader with 14 years of hands-on experience in full life cycle systems design, development, implementation, and management. In addition to systems design and development, his core competencies include cloud design and architecture, interactive web applications and websites development, mobile computing, and Healthcare Information Technology. His experience is very diverse with a broad range of technologies within multiple industry settings including private, public, and non-profit. Coupled with his technology expertise, Murugan is a well-organized, result-oriented, and a highly analytical leader with proven track record in developing and implementing very complex systems.