0
votes

In my application I have an "Event". And to this Event, I can attach documents.

Now when I show a dialog of this Event, I want to list all the documents, that are related and I do this with a "select"-Projection (because I don't want the property in the document, that has the binary representation in it, which would be huge).

Now from this list, I should be able to delete a document. As I did a projection, I don't have a breeze entity for the document so I cannot call setDeleted() on the entityAspect.

How would this be done? Do I have to query the whole document just to delete it?

I do all of this in a sandboxed DataContext so just sending a command to the server to delete the document and requery is not an option - as the dialog can be cancelled.

If I do this with standard queries and navigation properties everything works fine but potentially slow if there are big images.

1

1 Answers

1
votes

Check out this answer. Essentially, you can create an entity with the id of the entity you want deleted and set the entityaspect to 'deleted' and that should take care of it.