Skip to content

Performans sorunu ve kod kısaltmaları #12

Description

@kazimkesler

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions