Base solution for your next web application
Open Closed

Repository and IFullAudited problem #67

gvb created


I'm trying to make a list of my entity and it seem's that i cannot get the entities where the IsDeleted = true

_repoNews.GetAll().Where(x => x.IsDeleted == true).ToList().Count always return 0 but i have at least 1 entity that is Deleted.

Is there a way to get the IsDeleted = true ?

I found that ISoftDelete say ->

/// <summary> /// Used to standardize soft deleting entities. /// Soft-delete entities are not actually deleted, /// marked as IsDeleted = true in the database, /// but can not be retrieved to the application. /// /// </summary>

Is there a way to deactive this for a request?

The thing i wanna make is a list where I see all my entity and see if they are active / inactive (!deleted or deleted) and i want to be able to reactive an entity IsDeleted = true to IsDeleted = false

2 Answer(s)
  • 0
    gvb created

    Any idea on how to remove the filter SoftDelete from IRepository query ?

  • 0
    hikalkan created
    Support Team

    If you're in an application service, just call this:


    Then your deleted data is retrieved. You can then filter if you want.

    But notice that: If you need some Active/Passive state that passive entities are always retrieved into application unless you explicitly filter, then do not use ISoftDelete, use IPassivable.

    I'm documenting these nowadays (<a class="postlink" href=""> ... lters.html</a>) but not finished yet.