NetCoreBackend icon indicating copy to clipboard operation
NetCoreBackend copied to clipboard

Performans sorunu ve kod kısaltmaları

Open kazimkesler opened this issue 1 year ago • 0 comments

Result yapısında data olmasa bile aynı sonucu almamız gerekiyordu.

Ayrıca BusinessRules.Run fonksiyonu doğru yanlış demeden tüm argümanları çalıştırıyor. Bu gereksiz db çağrıları demek. IResult result = BusinessRules.Run(CheckIfProductNameExists(product.ProductName),CheckIfCategoryIsEnabled()); Örneğin burada CheckIfProductNameExists false ise devam etmemesi lazım.

BussinessRules.Run fonksiyonu yerine && operatörünü override ederek hoş bir ifade elde etmem gerekiyordu.

Generic tiplerde her seferinde tipi belirtmek istemedim, tip parametreden otomatik çıkarım yapılsın istedim.

Tüm bu sorunları şu şekilde çözdüm: https://github.com/kazimkesler/Custom-Boolean-Type

kazimkesler avatar Jun 03 '23 22:06 kazimkesler