I used to do this previously and it worked, but now it shows error, any suggesstion? What does Object reference not set to an instance of an object mean?
@foreach (var item in Model)
{
int daysLeft = (item.Membership.PaidDate - DateTime.Today).Days;
string style = daysLeft <= 7 ? "background-color:Red" : null;
<tr style="@style">