It's common to have methods like one below in the data access layer:
Tuple<int, IList<Media>> GetAllWithFilter(int? page, string folderName, string title, string fileName, string author, string keywordTitle, int type, int fileType, int rowsPerPage, Guid keywordId, string sortField = null, string sortDir = null);
And it get's 开发者_如何学Pythonmessier and messier every time a new property is added
What are the good practices to keep these methods readable and maintainable?
Thank You
Why not create an object that houses all your filter properties and just pass that around?
I think this one would help. Query pattern
精彩评论