Here’s what’s new in this release:
- Azure Active Directory authentication with Microsoft.Identity.Web
- CSS isolation for Blazor components
- Lazy loading in Blazor WebAssembly
- Updated Blazor WebAssembly globalization support
- New InputRadio Blazor component
- Set UI focus in Blazor apps
- Influencing the HTML head in Blazor apps
- IAsyncDisposable for Blazor components
- Control Blazor component instantiation
- Protected browser storage
- Model binding and validation with C# 9 record types
- Improvements to DynamicRouteValueTransformer
- Auto refresh with dotnet watch
- Console Logger Formatter
- JSON Console Logger
ReSharper 2023.2 منتشر شد
روش های مدرن برای ثبت خطا در سی شارپ
Logging is a big part of software development for many years now. One can argue that a logging mechanism is a must-have part of any application or library. I would agree with that statement. Logging has a crucial part to play in a scenario where you can’t use interactive debugging (that is, attaching a debugger like Visual Studio). It allows us to investigate errors after the problem already happened. In some cases, like Production Debugging, logs might be the only information you have.
LINQPad is a powerful testing tool for all .NET developers that can help them deliver solutions in less time. In Getting the Most from LINQPad Succinctly, returning Succinctly series author José Roberto Olivas Mendoza lays out different ways to extend the functionality built into LINQPad. In this ebook, you’ll learn how to use LINQPad to query Entity Framework models in Visual Studio, how to work with the LINQPad command-line utility, how to write your own extensions and visualizers, and how to write custom data context drivers.
-
A Quick Tour of LINQPad
-
LINQPad and Entity Framework
-
LINQPad Scripting
-
LINQPad Extensibility
-
Custom Data Context Drivers
اولین و اساسیترین قدم در نگهداری یک سیستم مبتنی بر داده، تهیه پشتیبانهای منظم و همچنین قابل اطمینان میباشد.
دستور T-SQL زیر بدون ریاستور کردن یک فایل بک آپ اس کیوال سرور، سعی در تعیین اعتبار آن میکند:
RESTORE VERIFYONLY
FROM DISK = 'C:\SQL_Backup\Test1'
WITH FILE = 1,
LOADHISTORY
The backup set on file 1 is valid.
SELECT DISTINCT physical_device_name
FROM msdb.dbo.backupmediafamily
ORDER BY
physical_device_name
DECLARE @path NVARCHAR(1000),
@msg NVARCHAR(MAX),
@NewLine CHAR(2),
@sql NVARCHAR(2000)
SET @NewLine = CHAR(13) + CHAR(10)
SET @msg = ''
DECLARE DATABASES_CURSOR CURSOR
FOR
SELECT DISTINCT physical_device_name
FROM msdb.dbo.backupmediafamily
ORDER BY
physical_device_name
OPEN DATABASES_CURSOR
FETCH NEXT FROM DATABASES_CURSOR INTO @path
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'Verifying: ' + @path
SET @sql = 'RESTORE VERIFYONLY FROM DISK = ''' + @path
+ ''' WITH FILE = 1, LOADHISTORY'
EXEC sp_executesql @sql
IF @@ERROR <> 0
BEGIN
SET @msg = @msg + 'Failed to verify: ' + @path + @NewLine
END
FETCH NEXT FROM DATABASES_CURSOR INTO @path
END
CLOSE DATABASES_CURSOR
DEALLOCATE DATABASES_CURSOR
IF @msg <> ''
BEGIN
PRINT @msg
-- send email
EXECUTE msdb.dbo.sp_send_dbmail
@recipients = 'nasiri@site.net', -- Change This
@copy_recipients = 'Administrator@site.net', -- Change This
@Subject = 'backup verification info.',
@Body = @msg
,@importance = 'High'
END
اسکریپت فوق بر روی تمامی مسیرهای ثبت شده موجود که در آنها پیشتر پشتیبان تهیه شده است، دستور RESTORE VERIFYONLY را اجرا میکند و در آخر اگر پیغامی حاصل شد، یعنی مشکلی پدید آمده و ایمیلی را به اشخاص مورد نظر ارسال میکند.
میتوان بر روی این اسکریپت یک job تهیه کرد که هر روز پس از تهیه بک آپ خودکار، کار بررسی صحت عملیات را نیز انجام دهد.
لیستی از C# Source Generators
C# Source Generators
A list of C# Source Generators (not necessarily awesome), because I haven't found a good list yet.
C# Source Generators is a Roslyn compiler feature introduced in C#9/.NET 5. It lets C# developers inspect user code and generate new C# source files that can be added to a compilation.
When Ruby on Rails, a web application framework written in the Ruby programming language, was first released as open source back in July 2004, it stumbled to rise in the rankings as one of the top programming languages. But in 2006, Apple announced that it would be shipping Ruby on Rails with their Mac OS X v10.5 “Leopard” and Ruby soon became known and used by many. So much so, that the TIOBE index, a measure of the popularity of programming languages, named Ruby the “Programming Language of 2006.” However, due to some scalability issues and the release of other exciting new tools, such as Node.js and AngularJS, Ruby started to lose its popularity and by 2008 it seemed as if it was on its way out.