Free Code Snippets in C#, Net Framework, Office 365, ASP.Net,WPF, Visual Studio, SQL Server, Antivirus free
#

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()>------------

}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mobile
»
the type or namespace name dbAppData_Context does not exist
»
Delete record in Linq
»
Code snippet: Create Linq Select table from ID number fields
»
EF: Determine new ID of a data record
»
Asp MVC: Output Data from SQL Server directly to a List Type
»
Linq: Query data with a left join
»
Asp Linq: Collect data with a LINQ query from SQL Server

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de