А вот ещё один интересный бенч. Есть такой паттерн - проверка существования значения в переменной с помощью расширения "TryGet". Мол, если у нас оно есть, то true, а иначе false.
Ну то есть удобно сделать так:
if (id.TryGet(out var existsId)) query = query.Where(dbo => dbo.Id == existsId)
Есть моментик. Можно написать наиболее общую штуку, которая делает instance.Equals(default), а можно конкретное написать instance == Guid.Empty. Второе сильно быстрее.
А вот ещё один интересный бенч. Есть такой паттерн - проверка существования значения в переменной с помощью расширения "TryGet". Мол, если у нас оно есть, то true, а иначе false.
Ну то есть удобно сделать так:
if (id.TryGet(out var existsId)) query = query.Where(dbo => dbo.Id == existsId)
Есть моментик. Можно написать наиболее общую штуку, которая делает instance.Equals(default), а можно конкретное написать instance == Guid.Empty. Второе сильно быстрее.
With Bitcoin down 30% in the past week, some crypto traders have taken to Telegram to “voice” their feelings. The administrator of a telegram group, "Suck Channel," was sentenced to six years and six months in prison for seven counts of incitement yesterday. During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content. The channel also called on people to turn out for illegal assemblies and listed the things that participants should bring along with them, showing prior planning was in the works for riots. The messages also incited people to hurl toxic gas bombs at police and MTR stations, he added.
from us