To avoid this warning, do not use:
async: false
in any of your
$.ajax()
calls. This is the only feature of XMLHttpRequest
that's deprecated.
The default is
async: true
, so if you never use this option at all, your code should be safe if the feature is ever really removed (it probably won't be -- it may be removed from the standards, but I'll bet browsers will continue to support it for many years).
Another reason (In my case):
- using : async: false
- Call CountAsync() (Iqueryable):
public virtual int Count(Expression<Func<TEntity, bool>> where){
return where == null ? _dbSet.AsQueryable().CountAsync().Result : _dbSet.Where(where).CountAsync().Result;
}
Không có nhận xét nào:
Đăng nhận xét