Please help translate this in linq to ef

Posted by user3487644 on Stack Overflow See other posts from Stack Overflow or by user3487644
Published on 2014-08-20T04:16:24Z Indexed on 2014/08/20 4:19 UTC
Read the original article Hit count: 105

Filed under:
|
|
|

StringBuilder sb = new StringBuilder();

sb.AppendLine("SELECT");

sb.AppendLine(String.Format(" (SELECT TOP 1 CAST(ProspectID AS VARCHAR(5)) FROM Lead_Import_Fail Where ProspectID <> {0} AND ProspectFullName = '{1}')", Convert.ToInt64(lead.LeadID), lead.Name));

sb.AppendLine(String.Format(", (SELECT TOP 1 CAST(ProspectID AS VARCHAR(5)) FROM Lead_Import_Fail Where ProspectID <> {0} AND ProspectNRICPassport = '{1}')", Convert.ToInt64(lead.LeadID), lead.NRIC));

Thanks in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql