I have a three tier ASP.Net Web application. The Data Layer has reference to EF and it contains all the repositories too. So I have installed EF nuget there.
Then I have a service layer to transfer data to and from data layer to views. Issue is, recently I came across a requirement where I need to use DbFunctions.AddDays but I don't want to install the complete EF in service layer for a single query. Is there any way I can achieve the same without installing EF i.e. any other way to achieve the same without using DbFunctions. Query is:
Context.Article.Where(p => EntityFunctions.AddDays(p.StartDate, p.Period) > DateTime.Now);
No good reason. This was enabled in EF Core, which runs on .NET Framework as well as .NET Core. EG:
translates to