Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Rudyzio/3e01a3950859cfe4a3b0aee81fc4f878 to your computer and use it in GitHub Desktop.
Save Rudyzio/3e01a3950859cfe4a3b0aee81fc4f878 to your computer and use it in GitHub Desktop.
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