August 04, 2020
  107
For those following the on-going discussion around the future of XAML and specifically the use of XAML in DotNetMaui/Xamarin.Forms, this post is a follow on from two great posts discussing the options that are, or will be, available for Xamarin.Forms developers as we move forward with DotNetMaui: Mobile Blazor Bindings – Getting Started + Why … Continue reading "Don’t Judge XAML Based On Lines of Code"
August 03, 2020
  113
How to use web gRPC in an Aurelia 2 SPA. Using a .NET 5 back end hosting a gRPC service. Showing compilation of protobuf files, front end build quirks and other oddities.
August 03, 2020
  99
President Donald Trump only agreed to allow Microsoft Corp to negotiate the acquisition of popular short-video app TikTok if it could secure a deal in 45 days, three people familiar with the matter said on Sunday.
August 02, 2020
  116
Exploring what could be the Universal Windows Platform at its finest.
August 02, 2020
  97
Orleans is an easy to use actor framework, but how can you monitor your deployment? Luckily, there’s something simple to use — Orleans…
July 28, 2020
  116
[DISPLAY_ULTIMATE_SOCIAL_ICONS] Entity Framework Core (EF) converts expressions into SQL at runtime. In earlier versions, it was straight forward to get the SQL. In Entity Framework Core 3, you must access the SQL using ILogger. This article explains how to access the SQL generated and gives some example code to access the output of queries made behind the scenes. This article works with Entity Framework Core 3. Note: Microsoft is about to release Entity Framework Core 5 soon. This version will have an easier method to get at the SQL. This is the interface method. Many developers may feel uncomfortable if they do not know what SQL EF executes behind the scenes. There's a good reason for this! Expressions may not map on to SQL very easily. You may end up executing SQL that doesn't take advantage of indexes, or the expression may end up filtering records after the data was selected from the database. In older versions of EF you could use ToTraceString()but this no longer exists in EF Core 6. There may even be other reasons to access the SQL. Perhaps your want to convert EF expressions to SQL. This is all possible in EF Core. Grab the full sample here. The Basics The key to making entity framework log SQL queries is to provide it with a logging factory: optionsBuilder.UseLoggerFactory(_loggerFactory); And, the factory must have a filter like so: var loggerFactory = LoggerFactory.Create(builder => { builder .AddFilter((category, level) => category == DbLoggerCategory.Database.Command.Name && level == LogLevel.Information); }); That's it. If you add console logging, SQL will be logged to the console when the SQL executes. var loggerFactory = LoggerFactory.Create(builder => { builder .AddConsole((options) => { }) .AddFilter((category, level) => category == DbLoggerCategory.Database.Command.Name && level == LogLevel.Information); }); This is an example query: using (var ordersDbContext = new OrdersDbContext(loggerFactory)) { var orderLines = ordersDbContext.OrderLines.Where(o => o.Id == Guid.Empty).ToList(); orderLines = ordersDbContext.OrderLines.ToList(); } This is the console output: info: Microsoft.EntityFrameworkCore.Database.Command[20101]Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30']SELECT COUNT(*) FROM sqlite_master WHERE type = 'table' AND rootpage IS NOT NULL;info: Microsoft.EntityFrameworkCore.Database.Command[20101]Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']SELECT o.Id, o.Count, o.ItemFROM OrderLines AS oWHERE o.Id = '00000000-0000-0000-0000-000000000000'info: Microsoft.EntityFrameworkCore.Database.Command[20101]Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']SELECT o.Id, o.Count, o.ItemFROM OrderLines AS o Incidentally, it looks as though the where clause is not parameterized. Is this a security hole in Entity Framework Core for SQLite? Here is some further documentation on this approach. Getting More Detail You may need more detail. Or, you may want to use EF to generate SQL for some reason. You can achieve that with this code. This is an implementation of ILogger that will allow you to hook into an action when SQL runs. public class EntityFrameworkSqlLogger : ILogger { #region Fields Action<EntityFrameworkSqlLogMessage> _logMessage; #endregion #region Constructor public EntityFrameworkSqlLogger(Action<EntityFrameworkSqlLogMessage> logMessage) { _logMessage = logMessage; } #endregion #region Implementation public IDisposable BeginScope<TState>(TState state) { return default; } public bool IsEnabled(LogLevel logLevel) { return true; } public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) { if (eventId.Id != 20101) { //Filter messages that aren't relevant. //There may be other types of messages that are relevant for other database platforms... return; } if (state is IReadOnlyList<KeyValuePair<string, object>> keyValuePairList) { var entityFrameworkSqlLogMessage = new EntityFrameworkSqlLogMessage ( eventId, (string)keyValuePairList.FirstOrDefault(k => k.Key == commandText).Value, ...
July 27, 2020
  116
Founded in 1930, Darnitsa is one of Ukraine’s leading manufacturers of medical products with an ambition to expand globally.
July 27, 2020
  155
As I am getting myself up to date with the modern C# language features, I'd like to share what feels...
July 26, 2020
  202
Featuring 3Blue1Brown Watch the 2nd video on 3Blue1Brown here: https://www.youtube.com/watch?v=MzRCDLre1b4 Support MinutePhysics on Patreon! http://www.patre...
July 24, 2020
  113
As companies look to modernize their applications and take full advantage of the benefits that cloud computing can deliver, they are looking for a partner with advanced skills to migrate, optimize, and manage their existing web workloads to the cloud

Hot Vacancies

Middle / Senior Full-Stack .NET developer

Springdel
.NET Core

The project aims to change the shape of the healthcare market making it easier to find affordable services.

Middle .NET Developer

MyCredit
.NET Core

MyCredit is a space with a huge soul and a pleasant atmosphere. We are a product company, a leader in the microcredit market with 4 years of experience! We are included in the Top 3 FinTech and e-commerce projects of the country! We believe in the potential of each person, in his talent and desire to develop, and we also believe in respect and support. Therefore, we have assembled a team of guys who share our faith and go forward with us. If all this is about you, be sure to read it to the end! Our team of professionals is rapidly gaining momentum, and now we are looking for a Middle .NET Developer who will be interested in working with BPM Corezoid.

Lead .NET Developer

MyCredit
.NET Core

MyCredit is a space with a huge soul and a pleasant atmosphere. We are a product company, a leader in the microcredit market with 4 years of experience! We are entering the Top 3 FinTech and e-commerce projects of the country! We believe in the potential of each person, in his desire to develop, and we also believe in respect and support. Therefore, we have assembled a team of guys who share our faith and go forward with us. If all this is about you, be sure to read it to the end! Our team of professionals is rapidly gaining momentum, and now we are looking for a Lead .NET Developer to work on a high-load project.

Backend Developer

Oneview Healthcare
.NET Core

Oneview Healthcare is a global company, working with hospitals and senior care facilities around the world.

Senior .NET Developer

.NET Core

We are looking for Senior .Net Developer to join Kiev team. You will be part of a team of strong, result-oriented professionals developing new generation tasks management, people management, learning platform.