0
andry3ag created
The patform is setup softdelete. I want to retrieve deleted record. How to do it?
1 Answer(s)
-
0
Use filters:
public async Task<PagedResultDto<SimpleUserDto>> FindByMyCriteriaSimple(SearchInputBasic input) { IDisposable filter = null; try { filter = _unitOfWorkManager.Current.DisableFilter(true); // now your query returns 'soft deleted' items too var users = await _userRepository.FindByMyCriteriaAsync(input.Pattern, input.SkipCount, input.MaxResultCount); . . . return ...; } finally { if (filter != null) filter.Dispose(); } }
See <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Data-Filters#DocDisableFilters">http://www.aspnetboilerplate.com/Pages/ ... bleFilters</a>