Home > Articles > Details

What is New in Asp Net 7 and EF Core 7 (Best Features)

Asp.Net Core 7

  1. Rate Limiting
    2. Output Caching
    3. Web Socket Connection is now supported in HTTP/2
         Previously it was only supported in HTTP/1 this time it will be faster because might support Multiplexing.
    4. The coming of HTTP/3 and Quick

    EF Core 7

    4. EF Core 7 now has a new feature called DataSource, which allows you to create database connections on the fly.
        - It is Thread Safe, it is more like Database Connection Pooling. Unlike DBContext which is not Thread Safe
              - This is huge in terms of using an ORM for your data Queries
        - It is a connection Pool behind the scene.

    5. EF Core has now a new feature called "Aggregate function" you can now perform Aggregate function right on the Entity like below"
    var max = _context.Blogs.Max(b => b.value);?

        1. You can now create two different Database Connections if you want to do Operations in Parallel,
           - Because DBContext is not thread-safe, that is why you see the error "Another Operation Started before the previous one completed" error in EF Core 6. This was a nightmare
             to debug especially when the function utilizing DbContext is an Async fun
        2. If you don't use the DI to open the connection to the database, that is if you use a data source straight, then you are responsible for disposing of the DB connection since you created it using the DataSource Factory, do not forget that best practice is to wrap the code in a 
            "using" directive.

    2. You could use String.Join to return a string of comma delimited string of values from the database
    var names = string.Join(" ,", a.Select(b => b.Names));?


    Language and Runtime


    Improvements around StartsWith and EndsWith


1. https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-preview-2/

2. EF Core 7 Data Source Feature

3. EF 7 Core Aggregate Functions

If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Josh said:

Is this a question, do you need help resolving it.

Posted On: September 12, 2022 13:05:19 PM
Bo said:

Hello Team, I am new here.

Posted On: September 11, 2022 17:04:19 PM
Bang said:


Posted On: September 11, 2022 9:14:07 AM
Jack said:

What a mess

Posted On: September 11, 2022 8:46:41 AM
Mark said:

This is so awesome

Posted On: September 11, 2022 8:43:29 AM

© 2022 - ErnesTech - Privacy