public IActionResult Create()
        {
            var view = new CreateRoleView
            {
                PermissionSections = _service.GetAllPermissionSections()
            };

            return(PartialView(view));
        }
Beispiel #2
0
 public async Task CreateRoleAsync(CreateRoleView view)
 {
     var request = new CreateRoleRequest
     {
         RoleName    = view.RoleName,
         Permissions = GetPermissions(view.PermissionSections),
         Description = view.Description,
         CreatedBy   = "Klen"
     };
     await _requestHelper.SendRequestAsync(BaseUrl, HttpMethod.Post, JsonConvert.SerializeObject(request, Formatting.None));
 }
        public async Task <IActionResult> Create(CreateRoleView view)
        {
            await _service.CreateRoleAsync(view);

            return(Content("create successfully"));
        }