1
我有一个包含价格数组的产品。我想根据用户组显示相应的价格。基于用户角色的数据
据我创建了一个被描述这些群体
- 联系
- UserPriceA
- UserPriceB
- UserPriceC
我想以某种方式获取当前用户角色的作用。
事情是这样的:
public decimal Price {
get
{
var price = Prices.First(p => p.PriceType.Name == Something.CurentUser.Role);
return price;
}
}