I have a product with array of prices. I want that based on the user group the corresponding price will be displayed.
As far i created roles that are describing these groups
- Admin
- UserPriceA
- UserPriceB
- UserPriceC
I would like somehow to get current users role.
Something like this:
public decimal Price {
get
{
var price = Prices.First(p => p.PriceType.Name == Something.CurentUser.Role);
return price;
}
}