is there some way of return null if it can\'t parse a string to int?
with:
public .... , string? categoryID) { int.TryParse(categoryID, out categoryID);
Do you want to do something like this?
public int? Parse(string categoryID) { int value; if (int.TryParse(categoryID, out value)) { return value; } else { return null; } }