Why use IRepository
i have always used services and created interfaces for different services. For example SqlProductService
ISqlProductService
. Why use generic repository what if lets say SaveToDb()
does more than just save entity maybe it expects product and maybe it does some calculations specisifc to product entity or adds it to a cart if that is generic then it would be very bad if i passed another entity instead of product. So i dont't understand why to use Repository instead service for each entity/model. Can anyone explain to me?
vendredi 5 mars 2021
Why use repository in ASP?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire