Readdy Write

Code sample: Create Linq Select table from ID number fields

10.08.2018 (๐Ÿ‘4318)

Code snippet: Create Linq Select table from ID number fields

 

call

List<long> list_to_Delete = clsDB.get_List_to_Delete_on_Server();

 

 

Code on WPF, Linq, EntitiyFramework

public static List<long> get_List_to_Delete_on_Server()

{

    //----------< get_List_to_Delete_on_Server()>------------

    var db = new dbAppData_Context();

 

    var query = (from scan in db.tbl_Scans

                 where scan.dtDeleted !=null && scan.IDProject_On_Server != null

                 select scan.IDScan );

    if (query != null)

    {

        List<long> data = query.ToList<long>();

        return data;

    }

    else

    {

        return null;

    }

    //----------</ get_List_to_Delete_on_Server()>------------

}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


0,00 €