Dropdownlist Asp.net mvc

Asked

Viewed 41 times

0

I have a product that can be registered in 2 stores A and B if I have already registered in A how do pro Dropdownlist show me only show option B next time it is in register? what would be the logic? using Entityframework and Linq?

[HttpGet]
public IActionResult Create(string businessId)
{
        var marketRest = new Rest
                             .MarketplaceRest(_appSettings.WebApiUrl, _appKeyBase64);

        var registerViewModel = new RegisterMarketPlaceViewModel
        {
            BusinessId = businessId,

        };
        registerViewModel.MarketNameSelectList = 
                registerViewModel.GetMarketplaceSelectList(marketRest, _memoryCache);

        return View(registerViewModel);
}
  • I don’t understand very well, you have a dropdown with two items A and B, if product A has already been registered, you want to show that only item B is available is this ?

  • exactly, I just wanted to show B now on the case, but I haven’t been able to come up with a logic so far.

  • How do you mount this dropdown ? You can show your code?

  • product was just example, I’m using mongoDb I don’t know if you’ve worked with this.

  • .GetMarketplaceSelectList(marketRest, _memoryCache).Where(x => !x.Vendido) cannot identify and filter before filling or inside the search method, only return available ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.