“does not contain a definition…and no extension method..” error

前端 未结 2 1473
予麋鹿
予麋鹿 2021-01-06 08:09

I have the following error message:

\'System.Collections.Generic.Dictionary\' does not
contain a definition for \'biff\' and no extensi         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-06 08:30

    You need to access the Value of the Dictionary for a given key. Something along these lines.

    foreach(var item in dbContext.DBView)
    {
        foreach(var key in cart.Keys)
        {
            cart[key].biff = item.biff;
        }
    }
    

提交回复
热议问题