public PagedResult <ApplicationUser> FindAll(QueryConstraints <ApplicationUser> constraints)
        {
            var items = constraints.ApplyTo(_dbContext.ApplicationUsers).ToList();
            var count = items.Count;

            return(new PagedResult <ApplicationUser>(items, count));
        }
        public PagedResult <ApplicationUser> FindByUserName(string text, QueryConstraints <ApplicationUser> constraints)
        {
            var query = _dbContext.ApplicationUsers.Where(x => x.UserName.StartsWith(text));
            var count = query.Count();
            var items = constraints.ApplyTo(query).ToList();

            return(new PagedResult <ApplicationUser>(items, count));
        }