Click here to Skip to main content
15,891,864 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 23:51
satc28-Jun-15 23:51 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Ralf Meier28-Jun-15 23:53
mveRalf Meier28-Jun-15 23:53 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 23:56
satc28-Jun-15 23:56 
JokeRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Eddy Vluggen29-Jun-15 0:00
professionalEddy Vluggen29-Jun-15 0:00 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc29-Jun-15 0:09
satc29-Jun-15 0:09 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Dave Kreskowiak29-Jun-15 3:01
mveDave Kreskowiak29-Jun-15 3:01 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc29-Jun-15 12:26
satc29-Jun-15 12:26 
AnswerRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Pete O'Hanlon29-Jun-15 2:06
mvePete O'Hanlon29-Jun-15 2:06 
As others have said, the best way to handle the delete with Entity framework is to have a soft-delete column. Now, if your requirement to manage hard deletes is an absolute must, then you are going to have to get down and dirty at the database itself - there is no way you can manage this via Entity Framework because, apart from anything else, the hard delete might just happen with the user typing DELETE.... directly against the database.

Given the fact that you now know that you will need to do this at the database level, this suggests that the mechanism might well have to be something that can react to a SQL command at the database. This would indicate, to me at least, that the mechanism that you are looking for is to use a delete trigger (actually, you're going to want to build up a lot of triggers). Now, a trigger is an atomic operation that only acts on one table so you're going to have to be clever with the way you build your trigger "scaffolding" so that you can recreate disparate statements. There's no real fool-proof way of guaranteeing that you can recreate the records because the user can do things in a way that prevents this, but you could make a best-effort that helps achieve this.
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc29-Jun-15 2:20
satc29-Jun-15 2:20 
AnswerRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Jörgen Andersson29-Jun-15 2:31
professionalJörgen Andersson29-Jun-15 2:31 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc29-Jun-15 14:46
satc29-Jun-15 14:46 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Jörgen Andersson29-Jun-15 18:46
professionalJörgen Andersson29-Jun-15 18:46 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc29-Jun-15 18:53
satc29-Jun-15 18:53 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Jörgen Andersson29-Jun-15 20:34
professionalJörgen Andersson29-Jun-15 20:34 
QuestionHow to join two hash table with Linq ? Pin
Dharmesh .S. Patil25-Jun-15 0:01
professionalDharmesh .S. Patil25-Jun-15 0:01 
AnswerRe: How to join two hash table with Linq ? Pin
CHill6025-Jun-15 2:20
mveCHill6025-Jun-15 2:20 
GeneralRe: How to join two hash table with Linq ? Pin
Dharmesh .S. Patil25-Jun-15 2:30
professionalDharmesh .S. Patil25-Jun-15 2:30 
QuestionCopy part of a row Pin
Member 1179008124-Jun-15 9:59
Member 1179008124-Jun-15 9:59 
AnswerRe: Copy part of a row Pin
Ralf Meier25-Jun-15 0:25
mveRalf Meier25-Jun-15 0:25 
QuestionHow to build Chart of Accounts using VB 2010 Pin
Member 1178537423-Jun-15 5:35
Member 1178537423-Jun-15 5:35 
AnswerRe: How to build Chart of Accounts using VB 2010 Pin
Mycroft Holmes23-Jun-15 20:10
professionalMycroft Holmes23-Jun-15 20:10 
GeneralRe: How to build Chart of Accounts using VB 2010 Pin
Member 1178537423-Jun-15 21:09
Member 1178537423-Jun-15 21:09 
GeneralRe: How to build Chart of Accounts using VB 2010 Pin
Mycroft Holmes23-Jun-15 21:54
professionalMycroft Holmes23-Jun-15 21:54 
GeneralRe: How to build Chart of Accounts using VB 2010 Pin
Dave Kreskowiak24-Jun-15 2:16
mveDave Kreskowiak24-Jun-15 2:16 
QuestionCompact and Repair of a sql server database Pin
satc23-Jun-15 1:05
satc23-Jun-15 1:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.