First impressions of Linq Expression<>

While at work yesterday, I saw a whole bunch of code like if (memberid > 0) parameters.Add(new SqlParameter(“@memberid”, memberid)); if (groupid > 0) parameters.Add(new SqlParameter(“@groupid”, groupid)); if (industryid > 0) parameters.Add(new SqlParameter(“@industryid”, industryid)); … and so on. It would be easy enough to squeeze it down to something like InsertIfGz(“@memberid”, memberid); InsertIfGz(“@groupid”, groupid); but it [...]

Continue Reading...

No Comments