-
I take on projects of all sizes for businesses of all sizes. Contact me for a no obligation initial discussion.
A properly designed database provides your business with access to up-to-date, accurate information.
Bespoke applications for a independent solution or add-on module will extend the capability of your existing system.
Monthly Archives: December 2012
ADO.NET EF – Delete a record
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// Start of code snippet BTFoxServiceEntities db = new BTFoxServiceEntities(); var Device = db.Devices.FirstOrDefault(d => d.ComPort.Equals(_ComPort)); if (Device != null) { db.DeleteObject(Device); db.SaveChanges(); } db = null; // End of code snippet |
A nice simple bit of code to delete a record from a table
Posted in C# Development
Comments Off on ADO.NET EF – Delete a record


