Created
October 10, 2019 21:31
-
-
Save Rudyzio/3e01a3950859cfe4a3b0aee81fc4f878 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UsersWithRecipesAndIngredientsSpecification : BaseSpecification<User> | |
{ | |
public UsersWithRecipesAndIngredientsSpecification() : base() | |
{ | |
AddInclude(x => x.Recipes); | |
AddInclude($"{nameof(User.Recipes)}.{nameof(Recipe.Ingredients)}"); | |
} | |
public UsersWithRecipesAndIngredientsSpecification(int id) : base(x => x.Id == id) | |
{ | |
AddInclude(x => x.Recipes); | |
AddInclude($"{nameof(User.Recipes)}.{nameof(Recipe.Ingredients)}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment