On Service Layer how to return couple entity from repository which is responsible of one entity -


if know correct each repository on entity
have , productservice need current product's images , there not repository images.
and product repositoy responsible of product entity.
repository return entity objects because repositories should unaware dto objects if know correct.
briefly how can return images entity. how should current selected product images.

between product , images foreign key .

but product can have 10.000 image row in database.

i need iqueryable data of them 10 10.

i tried product.images bla bla.. .but didnt satisfied me.

or should create new imagerepository , inject product service.

then use filtered method inside in baserepository.

how can design ?

leave product repository alone. can change service layer accept interfaces instead of baserepository. interface deal either ef or other type (not strictly ef\orm repository). there refactoring tools can generating interface existing baserepository (ex. resharper).


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -