EFCore.GenericRepository icon indicating copy to clipboard operation
EFCore.GenericRepository copied to clipboard

There are lot's of duplicated code

Open Zhao-Michael opened this issue 1 year ago • 3 comments

The code to build 'expressionTree' are duplicated

https://github.com/TanvirArjel/EFCore.GenericRepository/blob/01a306dc7ed892806d669cdbc183138ad721c068/src/TanvirArjel.EFCore.QueryRepository/QueryRepository.cs#L330C2-L330C2

https://github.com/TanvirArjel/EFCore.GenericRepository/blob/01a306dc7ed892806d669cdbc183138ad721c068/src/TanvirArjel.EFCore.QueryRepository/QueryRepository.cs#L389

https://github.com/TanvirArjel/EFCore.GenericRepository/blob/01a306dc7ed892806d669cdbc183138ad721c068/src/TanvirArjel.EFCore.QueryRepository/QueryRepository.cs#L571C38-L571C38

Zhao-Michael avatar Jan 04 '24 09:01 Zhao-Michael

@Zhao-Michael Thank you so much for reaching out. I shall take care of it. Or You can request an MR.

TanvirArjel avatar Jan 08 '24 06:01 TanvirArjel

Hi TanvirArjel, Actually, I'm not really understand why we need to build the lambda expressions here. Wouldn't there be a performance problem? or Isn't there a better and more elegant way?

Zhao-Michael avatar Jan 09 '24 01:01 Zhao-Michael