public async Task <IActionResult> DeleteAsync([FromRoute] Guid id) { // Read from the database and return notfound if they gave us the wrong ID if (await _taskListRepository.CountAsync(tl => tl.Id == UserId && tl.Entity.Any(t => t.Id == id)) > 0) { return(NotFound()); } // TODO: _messageSession.Send(); return(NoContent()); }
public Task <long> CountAsync() { return(_queryRepository.CountAsync()); }
public virtual Task <long> CountAsync(Expression <Func <TEntity, bool> > predicate = null) { return(_queryRepository.CountAsync(predicate)); }