Skip to content

Lookup #2567

Answered by ArgoZhang
fastlink30 asked this question in Q&A
Lookup #2567
Dec 12, 2023 · 8 comments
Discussion options

You must be logged in to vote

@fastlink30 follow the steps

Inject service

Program.cs

builder.Services.AddSingleton(typeof(ILookupService), typeof(FooLookupService));

Implement FooLookupService

\Services\FooLookupService.cs

using BootstrapBlazor.Components;

namespace BootstrapBlazorApp.OnlyServer1.Services;

class FooLookupService : ILookupService
{
    public IEnumerable<SelectedItem>? GetItemsByKey(string? key)
    {
        IEnumerable<SelectedItem>? ret = null;

        if (key == "TestClass.Value")
        {
            ret = new SelectedItem[]
            {
                new("6a3413db-a958-47d0-877e-6b698fc0949f", "LookupService-Test-1"),
                new("07b2ae67-8159-497d-b6f3-1145cd9a238b", "LookupServ…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ArgoZhang
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants