if record exists update else insert using LINQ
Posted on 2008-06-10
I have an xml file that I parse and insert into the database. What I want to do is, if the records in the xml file already exist in the database I just want to update the database, If they don't exist I would like to insert them. I would like to do this as efficiently as possible either through LINQ and/or stored procedures, but can't find anything online. The xml file has IDs that correspond to database IDs.
Running ASP.NET 3.5 and MS Server 08