I have a class divided in two partial files, like this:
public partial class PersonRepository : BaseRepository<Person>
{
public static readonly string ColumnID = "ID";
...
and
public partial class PersonRepository : BaseRepository<Person>
{
public List<Person> GetByCompany(int companyID, string sortExpression = ColumnID)
{
...
But the compiler keeps saying that sortExpression
"must be a compile-time constant". To me it seems a perfect compile-time constant, so I don't understand where the problem is.