Closed HellHunterMax closed 2 years ago
Good idea but there's something very important we need to have a look at We chose to do a sort of N-tier architecture in order to decouple the components from each other, which is another reason we choose repository pattern because we want to abstract away our data access layer.
Whats happening here is that we are providing an expression from another layer as if it were a generic repository pattern.
This could be simplified in to
class JokesParams
{
public string Search { get; set; } //search for any joke that contains the text
public string AuthorId { get; set; } //search for a specific author's joke
public int MinLikes { get; set; }
public int MaxLikes { get; set; }
}
@chrisK00 Thanks for the comments I agree with them and I'll have a look tonight! thanks! learnt a lot from this though!
Easy to add new jokes by adding a new filter with the IFilter interface and adding it to the JokeFiltersDto and adding it in JokesService.
How about this?
Closes: #91