public static IUserRoleCommand ToCreateOrMergePatchUserRole <TCreateUserRole, TMergePatchUserRole>(this IUserRoleState state)
            where TCreateUserRole : ICreateUserRole, new()
            where TMergePatchUserRole : IMergePatchUserRole, new()
        {
            bool bUnsaved = ((IUserRoleState)state).IsUnsaved;

            if (bUnsaved)
            {
                return(state.ToCreateUserRole <TCreateUserRole>());
            }
            else
            {
                return(state.ToMergePatchUserRole <TMergePatchUserRole>());
            }
        }