public static AllRequest <ApplicationRole> ConvertAll(this RoleAllRequestVM allRequestVM)
        {
            var allRequest = allRequestVM.Convert <ApplicationRole>();

            allRequest.Data.RoleId      = allRequestVM.RoleId;
            allRequest.Data.RoleName    = allRequestVM.RoleName;
            allRequest.Data.Active      = allRequestVM.Active;
            allRequest.Data.CreatedById = allRequestVM.CurrentUserId;
            return(allRequest);
        }
Esempio n. 2
0
        public async Task <AllResponseVM <RoleAllResponseVM> > GetAll([FromQuery] RoleAllRequestVM requestVM)
        {
            AllRequest <ApplicationRole> request = requestVM.ConvertAll();

            AllResponse <ApplicationRole> response = await this.RoleApplication.GetAll(request);

            AllResponseVM <RoleAllResponseVM> responseVM = response.ConvertAll(base.UseDefaultLanguage);

            return(responseVM);
        }