1
我想用類OfferFilter來處理請求提供路由屬性:服務棧 - 複雜請求類
public class OfferFilter
{
public int SortOrder { get; set; }
public int PageSize { get; set; }
public int PageNumber { get; set; }
public string SearchQuery { get; set; }
public bool ShowAllLanguages { get; set; }
public int? SearcherSectorId { get; set; }
public int? CountryId { get; set; }
public int? RegionId { get; set; }
public string City { get; set; }
public int? AskingPriceFrom { get; set; }
public int? AskingPriceTo { get; set; }
public bool AskingPriceSelected { get; set; }
public int? SalesRevenuesFrom { get; set; }
public int? SalesRevenuesTo { get; set; }
public bool SalesRevenuesSelected { get; set; }
public int? IncomeFrom { get; set; }
public int? IncomeTo { get; set; }
public bool IncomeSelected { get; set; }
public int? Age { get; set; }
}
我怎麼能做出一個路由屬性?使用POST會更容易,但它會是GET請求。正常的路線字符串將是巨大的,非常容易出錯。