Compile error with package reference
jansohn opened this issue · 2 comments
I'm probably doing some rookie mistake but I cannot find the reason why I cannot use this library.
1. Description
In our .NET framework 4.8 project I've included the following nuget packages as package references
- EntityFramework 6.4.4
- EntityFramework.DynamicFilters 3.2.0
and tried to declare a filter in OnModelCreating(DbModelBuilder modelBuilder)
with
modelBuilder.Filter("SoftDelete", (ITimeStamp t) => t.DeleteDate, null);
2. Exception
Compile error:
error CS1061: 'DbModelBuilder' does not contain a definition for 'Filter' and no accessible extension method 'Filt er' accepting a first argument of type 'DbModelBuilder' could be found (are you missing a using directive or an assembly reference?)
Are there any restrictions I am missing?
Hello @jansohn ,
You might miss only the using directive perhaps?
using EntityFramework.DynamicFilters;
Here is an online example template: https://dotnetfiddle.net/VOw5Cz
If that's not the issue, could you provide us a runnable project with the minimum code that reproduces it. That will be easier for us to discover why you are getting this compilation error. You can send your project in private here if you want: info@zzzprojects.com
Best Regards,
Jon
Sponsorship
Help us improve this library
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function
thanks, that was it!