Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User
linq ; delete ;

Delete record in Linq

10.08.2018 (👁186)


 

Code snippet: delete record

 

call

clsDB.Delete_byID(IDProject_on_Server);

 

 

Code on WPF, Linq, Entity Framework

public static void Delete_byID(long id)

{

    //----------< Get_RefNr_OnServer_toDelete()>------------

    var db = new dbAppData_Context();

 

    tbl_Scans recordset = db.tbl_Scans.FirstOrDefault(s => s.IDScan == id);

    if (recordset != null)

    {

        db.tbl_Scans.Remove(recordset);

        db.SaveChanges();

    }        

    //----------</ Get_RefNr_OnServer_toDelete()>------------

}