.NET 6 New LINQ Features with Entity Framework - sql-server

In .NET 6 there are some nice new LINQ extension methods, e.g.
var oldest = context.People.MaxBy(p => p.Age);
However, these features do not yet seem to be supported by EF providers (certainly not SQLite or SQLServer, both version 6.0.0).
Does anyone know when these are planned to be available in these providers?

Currently they are not supported by EF Core (at least by providers shipped by EF Core team) and are investigated by the team for support in 7.0. See this github issue.
And this issue for other new LINQ features.

Related

How can I tell what edition / variant of ABP my application is built on?

I've inherited an application, whose origins are lost in the mists of time. It's fairly obvious, based on DLL references and database tables, that the application is based on some edition / variant of ASP.NET Boilerplate. The question is exactly which one? The possibilities (I know of) are:
ASP.NET Boilerplate (free, open source)
ABP Framework (free, open
source)
ASP.NET Zero (licensed, source provided)
ABP Commercial
(licensed, source provided)
Whatever I have, it's obviously an old version since it's running on .NET Framework. (Latest versions of all of these application frameworks run on .NET Core.) We are working toward a phased transition to .NET Framework on .NET Core but one of the first things I picked up on is the incompatibility of my existing database structures for account authentication with the latest ABP Framework. One of the prerequisites for a phased transition is that a single database repository should accommodate account authentication from both the legacy system (as it does today) and the new system we are going to start constructing. I'd like to start working on various alternatives to bridge the gap from "here" to "there" but I'm handicapped by not even knowing where "here" is. I do know that the existing application is based on some variant of ASP.NET Boilerplate, but there are at least four of those. If you can help me pinpoint exactly what I've got, that will be immensely helpful. Thanks!
(All application ABP references are to DLLS. We don't have any ABP source code which might be useful for identification purposes.)
Here is a snapshot of the database tables, if that helps to make the identification:
Here is the one row within the abpEditions table:
Packages with the Abp prefix belong to ASP.NET Boilerplate or ASP.NET Zero. Packages with the Volo.Abp prefix belong to the ABP Framework or ABP Commercial. Since you have the Abp.Zero package, it appears to belong to ASP.NET Zero. The version information also appears to be 4.0.

Selecting correct .Net Framework for basic WPF - NUGET package can't install

I have created my first WPF project and it is written in .NET framework 4.7.2
I have NO idea about the importance and functionality of this however I want to be able to install it in a few businesses with as little chance of them needing to install a new framework. Perhaps that isn't important and I should just include it in the installer, but that is what I am not sure of.
I tried rolling back to 4.5 .NET however now one of my packages will not install on that framework.
Install-Package : Could not install package 'FluentEmail.Mailgun 2.8.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6', but the package does
not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
If I do any framework lower than 4.7.2 I can't see to run this, however I can't find documentation referring to this needing a specific framework to run.
Any pointers in the right direction would be helpful,
eg. Is the framework important for a basic WPF app not using any crazy tech, just a few API's and mainly data storage?
Can I force this package to install on an earlier based framework or is that going to fail?
The FluentEmail.Mailgun package targets .NET Standard 2.0 which you can see by expanding the Dependencies section at NuGet.org.
.NET Standard 2.0 is implemented by .NET Framework 4.6.1 and later which you read from the compatibility matrix in the docs.
This basically means that you need to target at least 4.6.1 to be able to consume the package in your app.
There is a caveat though:
While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.
So if you are developing a new app, you are recommended to either target .NET Framework 4.7.2 or later or even better .NET Core 3.1 or .NET 5.
If you want the full story of which versions that are officially supported on which operating systems, you should refer to the lifecycle FAQ in the docs.
Targeting 4.5 doesn't make much sense since the support for it ended back in January 2016.

DotnetNuke EntityFramework

I am new to .Net nuke, I want to display the records in Repeater control and do some group by functionality and order by functionality from database(Sql server 2008 R2) and I need to use( .Net Nuke 6.0 & Entity Frame Work 4 or 5), I have to follow MVP, please give me any suggestions, Thanks
If you are looking to use DotNetNuke for your own purposes, you can use Entity Framework without any special considerations.
If you are looking to deploy a commercial solution on DotNetNuke, you will want to consider the use of the {objectQualifier} and {databaseOwner} configuration options. As supporting those is important for widespread DotNetNuke support and not 100% easy to do with EF.
You should consider using PetaPoco over entity framework. DotNetNuke 7.x has PetaPoco support built in and, IMHO, is a much better solution.
Learn More: http://www.charlesnurse.com/Blog/tabid/226/EntryId/56/DAL-2-Caching-Scoping-and-Custom-Mappings.aspx

Async Targeting Pack Versions

There appear to be two NuGet packages to use async/await in Silverlight applications. I've used
http://nuget.org/packages/Microsoft.CompilerServices.AsyncTargetingPack
so far, but this didn't show up in the search anymore. Instead I found
http://nuget.org/packages/Microsoft.Bcl.Async/
However, both are last changed at the same date (4/18/2013) and none refers to the other in the description. I'm tempted to believe that the latter supersedes the former, but I'm not sure.
My question is specifically how these packages relate to each other and more generally if there's some documentation / principles about nuget releases that I should be aware of to make sense of this by myself (eg: is it typical to supersede on package with another, where is this documented, etc.).
Microsoft.Bcl.Async is a replacement for Microsoft.CompilerServices.AsyncTargetingPack.
It is not typical to supersede one package with another on NuGet unless you change its name. In this particular case, I believe AsyncTargetingPack was (incorrectly) listed without the "prerelease" flag, and then the team at Microsoft took a wider approach (supporting more scenarios) in Bcl.Async.
Bcl.Async in my mind superseded AsyncTargetingPack when it was first (pre)released several months ago, but there was some confusion for two reasons: 1) The team still referred to Bcl.Async as the "async targeting pack", and 2) The Bcl.Async package was (correctly) listed as prerelease, so for many devs only the AsyncTargetingPack would show up in NuGet searches.
Again, this is all speculation, but I suspect the Microsoft team decided to leave things as they were rather than break backwards compatibility for devs who were already using AsyncTargetingPack.
Now that Bcl.Async is at a final release, they can (and did) go back and correct the AsyncTargetingPack/Bcl.Async mixup so that both existing and new devs can easily find the correct package.
I am on Windows XP with VS2010 and .NET 4.0 with Async CTP and other extensions for C# 5.0
Here is my post how I get/use extensions for C# 5.0 in .NET 4.0, which (.NET 4.0 on machine without installed .NET 4.5) is different from .NET 4.0 on machine with installed .NET 4.5
I do not use NuGet since it always brings packs either for .NET 4.5 (with descriptions for .NET 4.0) or for .NET 4.0 which do not work in .NET 4.0 without .NET 4.5 installed
Related posts:
My answer to question "Asynchronous Programming with Async and Await"
My question "Equivalence or conversion matrix between .NET 4.0 Async CTP terms and their .NET 4.5 analogs?"

Entity Framework 4.2 Code First Features

I would like to know what features are included in the newest release of entity framework 4.2 using the code first approach? I have searched and haven't found much.
I am interested in using stored procedures. Does EF 4.2 code first support this feature yet? Any articles that I can read to help me on my way, I did Google and could not find much :)
There are no new features in EF 4.2 - it is fixed version of EF 4.1 Update 1:
It provides fix to issue with broken backward compatibility introduced in EF 4.1 Update 1
EF 4.1 Update 1 contained minor bug fixes and new types for context factory implementation.
ADO.NET team has also changed versioning so EF 4.2 is not release of June 2011 CTP - this CTP will be probably part of .NET 4.5 because separate release of EF core libraries didn't work as expected.
New features introduced in June 2011 CTP didn't contain any support for Stored procedures in code only mapping.

Resources