I'm developing an ASP.NET MVC 5 website and I have a view with a grid. In this grid I have a column which represents an URL property.
This url is a link to download some files, but this url should be available only in certain conditions i.e:
public static GetLinkStatus ValidateLint(RequestDTO request, string currentVersion)
{
if (request.Link == null)
return LinkStatus.Processing;
if (request.ExpirationDate < DateTime.Now)
return LinkStatus.OutOfDate;
if (request.Version.Equals(currentVersion))
return LinkStatus.Available;
return LinkStatus.Unavailable;
}
And in the View I call this static method to check the status and according to this, render some html.
My question is, if there a better way to deal with those 'ifs' conditionals statements?