DocSas/PropertyService.Domain/ModelView/Roles/RoleProvider.cs
/// <summary>
/// delete available role as an asynchronous operation.
/// </summary>
/// <param name="roleId">The role identifier.</param>
/// <param name="userId">The user identifier.</param>
/// <returns>Task&lt;DSCResponse&gt;.</returns>
delete available role as an asynchronous operation.
delete available role as an asynchronous operation .
public async Task<DSCResponse> DeleteAvailableRoleAsync(Guid roleId, Guid userId)
        {
            var response = new DSCResponse();
            var issuccess = false;
            var management = await _appCommon.GetManagementUserAsync(userId);
            if (management != null)
            {
                var role = await _availableRoleRepo.GetSingleAsync(x => x.Id == roleId && management.Id == x.ManagementUserId);
                if (role != null)
                {
                    issuccess = await _availableRoleRepo.DeleteAsync(role);
                }
            }
            response.ResponseData = issuccess;
            return response;
        }
public async Task < DSCResponse > DeleteAvailableRoleAsync ( Guid roleId , Guid userId ) { var response = new DSCResponse ( ) ; var issuccess = false ; var management = await _appCommon . GetManagementUserAsync ( userId ) ; if ( management != null ) { var role = await _availableRoleRepo . GetSingleAsync ( x => x . Id == roleId && management . Id == x . ManagementUserId ) ; if ( role != null ) { issuccess = await _availableRoleRepo . DeleteAsync ( role ) ; } } response . ResponseData = issuccess ; return response ; }
delete available role as an asynchronous operation.
delete available role as an asynchronous operation .
None
roleId
Guid
The role identifier.
The role identifier .
userId
Guid
The user identifier.
The user identifier .