Alt.Net Talks 2016.12 : Akka.Net, Async/Await, .NET Core, Micro-ORMs and EFCore.

Just a few days before the new year, Alt.Net France in Paris hosted three lightning talks. The meetup was animated by Rui Carvalho. The venue was sponsored by Cellenza.

The first talk was about the Actor Model and one of its implementation Akka.Net presented by Mickaël Metesreau.

Akka.NET is a toolkit and runtime for building highly concurrent, distributed, and fault tolerant event-driven applications on .NET & Mono.

Questions and Answers

Imed's Question: "What's the difference with MassTransit — a free, open source, lightweight message bus for creating distributed applications using the .NET framework?"

— "The Actor Model system is not used to manage persistent messages. It uses messages only for communication where the system bus persists and routes messages."

Fabrice's Question: "Which type of projects where the Actor Model should be applied?"

— "It's not specific to any kind of problem, it's a better way to write objects."

The second talk was about Async-Await programming guidelines authored by Thomas Pierrain. I wrapped them up in the following table:

Name Description Exceptions
Avoid async void Prefer async Task methods over async void methods Event handlers even though use try catch
Async all the way Don’t mix blocking and async code Console main method
Configure context Use ConfigureAwait(false) when you can Methods that require con­text

Stephane Belkheraz continued a series of ASP.NET Core 1.0 RTM concepts and features. This time, the focus is on the data access and how to do it simply. The source codes and the slides are hosted in GitHub.
Questions and Answers

Rui's Question: "Did the system of OnModelCreating with the stuff inside it change in Entity Framework Core 1.0 RTM? It was to see if my lib would be still useful : EFMap."

— "No, it still the same!" We create our entities inside OnModelCreating(ModelBuilder modelBuilder) method of our DbContext class:

class MyContext : DbContext  
        public DbSet Blogs { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
                .Property(b => b.Url)

Question: "Can we use LINQ to Entities with Dapper?"

— "No, we use LINQ to Objects since it's not Entity Framework."

Question: "How to do Multiple Active Result Sets per connection?"

— "You can use MARS which stands for (Multiple Active Result Sets) since 2005. In the ConnectionString, you should have MultipleActiveResultSets=true :" Note the typo "Resut" instead of Result in the msdn blog post.

At the end of Stephane's talk, Rui recommended Dapper since it's used by StackOverflow and has great benchmark results. It does the mapping and doesn't manage the DataReader loop.

Thomas recommended a ligthning talk of Christin Gorman to know what are the reasons for not using an ORM!

See you next year at the next Alt.Net meetup! I wish you all Happy Holidays :-)

#dotnetcore #aspnetcore #altnetfr #ORM #Dapper #Entity Framework #EFCore #asynchronous programming #Actor Model #community

Hi, I'm Maher, Development Technologies MVP. I'm blogging about ASP.NET Core and Microsoft Azure.