اشتراک‌ها
مزایای مهاجرت از ASP.NET MVC 5.x به ASP.NET Core از دیدگاه کارآیی برنامه‌ها

Results and Impact
- Average Latency improved from 350ms to less than 250ms.
- CPU during peak time was [60–40%]. This dropped to [15–25%].
- AWS Cost Reduction by replacing Windows with Linux servers [by 45%]
- Apache benchmarking [89 vs. 57 req/s]: .NET Core — 89.68 requests / second. .NET Framework on Windows — 57.21 requests/second
- JMeter [Throughput — 142.9 vs. 60.5 per second]: .NET Core Solution: Hit 1000 requests on http://XXXX.redbus.pe/ , Throughput was 142.9/Sec. NET Framework on Windows: Hit 1000 requests on http://XXXX.redbus.pe/, Throughput was 60.5/Sec.
- Blazemeter [90% response time — 417ms vs. 1.09s]: .NET Core Solution: 90% Response time was 417ms. .NET Framework on Windows: 90% Response time was 1.09s.

مزایای مهاجرت از ASP.NET MVC 5.x به ASP.NET Core از دیدگاه کارآیی برنامه‌ها
اشتراک‌ها
کتاب Rider Succinctly

OVERVIEW

Rider is the new .NET-centric IDE from JetBrains. In Rider Succinctly, author Dmitri Nesteruk introduces it to developers and provides an overview on its origins, functions, and features. With this ebook, readers will be ready to begin developing using Rider.

TABLE OF CONTENTS
  • Introduction

  • Up and Running with Rider

  • Running, Debugging, and Testing

  • Search and Navigation

  • Coding Assistance

  • Code Generation

  • Refactoring

  • IDEA Platform Features

 
کتاب Rider Succinctly
اشتراک‌ها
روش‌های مقابله با مشکل امنیتی Mass Assignment در ASP.NET Core
  • Use BindAttribute on the action method 
  • Use [Editable] or [BindNever] on the model 
  • Use two different models 
  • Use a base class 
  • Use ModelMetadataTypeAttribute 
  • Explicit binding via TryUpdateModelAsync<> 

This was a very quick run down of some of the options available to you to prevent mass assignment. Which approach you take is up to you, though I would definitely suggest using one of the latter 2-model approaches. There are other options too, such as doing explicit binding via TryUpdateModelAsync<> but the options I've shown represent some of the most common approaches. Whatever you do, don't just blindly bind your view models if you have properties that should not be edited by a user, or you could be in for a nasty surprise.

And whatever you do, don't bind directly to your EntityFramework models. Pretty please. 

روش‌های مقابله با مشکل امنیتی Mass Assignment در ASP.NET Core
اشتراک‌ها
دوره پیاده سازی minimal API با دات نت 7

.NET 7 minimal API from scratch | FULL COURSE | clean architecture, repository pattern, CQRS MediatR

In this course I want to provide you a project structure and code organization to get you started with real .NET 7 minimal API projects. It's a full course on this topic where I start from creating and explaining the project structure, setting up different layers using EF Core, repository pattern, CQRS and MediatR. The biggest part of the video is however around the .NET 7 minimal API, taking you from the initial setup, explaining route handlers, implementing all CRUD operations and so on. Last but not least, this course walks you through the process of refactoring the .NET 7 minimal API so that it becomes readable, maintainable and scalable. At the end, you'll have a full project structure organized according to modern architectural patterns that you can take as a template for your own projects.

Contents
1. Intro: 00:00
2. Structuring the solution: 01:00
3. Coding the domain layer: 05:25
4. Coding the data access layer: 08:22
5. Creating repositories: 11:17
6. Adding migrations and database update: 22:30
7. CQRS with MediatR: 29:07
8. Route and rout handlers: 52:06
9. Dependency injection: 55:52
10. Implementing GET by ID : 57:40
11. Implementing POST route: 01:00:26
12. Implementing GET all route: 01:03:41
13. Implement PUT and DELETE: 01:04:57
14. Testing with Postman: 01:09:01
15. Is there a problem? 01:12:41
16. Refactoring service registrations: 01:15:49
17. Refactoring route registrations: 01:20:01
18. Automatic registration of endpoints: 01:26:28
19. Introducing route groups:  01:31:43
20. Extract lambdas into instance methods: 01:34:31
21: Model validation with endpoint filters: 01:45:58
22. Global exception handling: 01:55:10
23. Conclusions: 01:59:49 

دوره پیاده سازی minimal API با دات نت 7
نظرات مطالب
بازنویسی ساده‌تر پیش فرض‌های EF Code first در نگارش 6 آن
من با EF6 از
modelBuilder.Types().Configure(c=>c.Ignore("IsDeleted"));
استفاده کردم ولی خطای زیر رو میگیرم:
You cannot use Ignore method on the property 'IsDeleted' on type 'MyEntity' 
because this type inherits from the type 'BaseEntity' where this property is mapped.
To exclude this property from your model, use NotMappedAttribute or Ignore method on the base type.
اشتراک‌ها
Visual Studio 2019 version 16.1.2 منتشر شد
Visual Studio 2019 version 16.1.2 منتشر شد
اشتراک‌ها
پیاده سازی Drag ‘n’ Drop Shopping Cart With jQuery UI
Drag ‘n’ dropping items has its various popular uses and shopping carts are definitely one of them.
In this tutorial, we’ll be creating a simple shopping cart that works with drag ‘n’ drops.
It will have support for add-to-basket with quantity updates (so that the same items could be added more than once) and removing items from the basket.

Demo  Download
پیاده سازی Drag ‘n’ Drop Shopping Cart With jQuery UI