public async Task <ActionResult <int> > Count([FromBody] AppUser_AppUserFilterDTO AppUser_AppUserFilterDTO)
        {
            if (!ModelState.IsValid)
            {
                throw new BindException(ModelState);
            }

            AppUserFilter AppUserFilter = ConvertFilterDTOToFilterEntity(AppUser_AppUserFilterDTO);
            int           count         = await AppUserService.Count(AppUserFilter);

            return(count);
        }
Example #2
0
        public async Task <long> CountAppUser([FromBody] Role_AppUserFilterDTO Role_AppUserFilterDTO)
        {
            AppUserFilter AppUserFilter = new AppUserFilter();

            AppUserFilter.Id             = Role_AppUserFilterDTO.Id;
            AppUserFilter.Username       = Role_AppUserFilterDTO.Username;
            AppUserFilter.DisplayName    = Role_AppUserFilterDTO.DisplayName;
            AppUserFilter.Email          = Role_AppUserFilterDTO.Email;
            AppUserFilter.Phone          = Role_AppUserFilterDTO.Phone;
            AppUserFilter.OrganizationId = Role_AppUserFilterDTO.OrganizationId;
            AppUserFilter.StatusId       = new IdFilter {
                Equal = StatusEnum.ACTIVE.Id
            };

            //if (AppUserFilter.Id == null) AppUserFilter.Id = new IdFilter();
            //AppUserFilter.Id.In = await FilterAppUser(AppUserService, OrganizationService, CurrentContext);

            return(await AppUserService.Count(AppUserFilter));
        }