Linq to sql Conversion RRS feed

  • Question

  • var Files2FTP = From p In db.FileUploadTransactions _

    Where Object.Equals(p.FTPStatusCode, status) And _

    (p.DataExtractStatusCode = Convert.ToChar(GMISExcelParser.DataExtractStatusCode.P.ToString) _

    Or p.DataExtractStatusCode =

    Convert.ToChar(GMISExcelParser.DataExtractStatusCode.Q.ToString)) _

    Select FUTCode = p.Code, UTDesc = p.LoadFileName.UploadType.Desc;

    I need to convert from linq to sql.

    Thanks in advance

    • Moved by VMazur Tuesday, November 3, 2009 11:40 AM (From:ADO.NET Data Providers)
    Thursday, October 22, 2009 6:57 PM


  • Hi Sam581,

    You can simply add 'db.Log = Console.Out;' to your project to see the 'translation' of your Linq query to SQL expression. Then you can modify the SQL expression you'll get to fit your needs.

    Best regards,
    Charlie Lee

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Yichun_Feng Thursday, October 29, 2009 1:22 AM
    Monday, October 26, 2009 3:38 AM