Replies: 1 comment
-
|
Hello! Actually, it's already supported. You just need to create a custom repository and then write your complied query like this: public class CustomBlogRepository : Repository<Blog>, ICustomBlogRepository
{
private static readonly Func<DbContext, IList<string>> GetAllBlogUrlsDelegate =
EF.CompileQuery<DbContext, IList<string>>((dbContext) =>
dbContext.Set<Blog>()
.Select(blog => blog.Url)
.ToList());
public CustomBlogRepository(DbContext dbContext)
: base(dbContext)
{ }
public IList<string> GetAllBlogUrls()
=> GetAllBlogUrlsDelegate(DbContext);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, any plan feature to support EF compiled queries?
Beta Was this translation helpful? Give feedback.
All reactions