stream:// .net core

August 10, 2020
C# pattern matching finally brings another functional feature that will help C# developers write functional code more naturally.
August 08, 2020
SharpShell makes it easy to create Windows Shell Extensions using the .NET Framework. - dwmkerr/sharpshell
August 06, 2020
The new record type will be a huge timesaver when working with immutable objects in C#.
August 04, 2020
I'm pretty much convinced almost all applications need search. No matter what you're building, you'll likely handle data, and no matter how well you organize it, a good text search is often the …
August 03, 2020
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 02, 2020
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
[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
As I am getting myself up to date with the modern C# language features, I'd like to share what feels...
July 22, 2020
In this article I'll describe how to modernise your .NET Framework projects for .NET Core, the .NET Standard and .NET 5, which is planned to be released this year.

Hot Vacancies

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.

C# developer

Wallit SRO
.NET Core

A Hybrid exchange (HEX) is the link that will unite the advantages of a centralized exchange, such as cooperation with large investors and the trust of many users with the advantages of a decentralized exchange. Ping Exchange is a hybrid-decentralized exchange with a specific focus on a user-friendly, trading platform which also provides the ability for peer-to-peer, community barter trades. Trading on the Ping Exchange platform with our broker software is exceptionally fast, once again in line with our global design objectives.

Middle .Net developer

.NET Core

We are looking for Middle .Net developer. Our client is a company that serves the terminals around the world!

Backend developer

.NET Core

We are an Irish product company “OneView Healthcare” and we are looking for backend developer!

Lead Software Engineer at ServiceTitan

.NET Core

ServiceTitan is a leading mobile, cloud-based software platform that connects home service companies with value-added products and services. In 2018 the company raised $165 million in Series D funding and became a unicorn startup. 60% of the working time of an Engineer will be devoted to the development, 40% - to the work on requirements, mentorship, and supervision. You will work on new features and products.