public static void DeleteProperties() { dataDataContext dataDataContext = new dataDataContext(StaticCalls.ConnectionString); List <Property> ls = (from w in dataDataContext.Properties where w.Property_Id_ext != (string)null select w).ToList(); dataDataContext.ExecuteCommand("DELETE FROM [dbo].[Properties] WHERE [Property_Id_ext] IS NOT NULL"); StaticCalls.send_text("\\c"); StaticCalls.send_text("Properties Deleted"); StaticCalls.Remove_Images(ls); StaticCalls.send_text("Images Deleted"); }