N.EntityFrameworkCore.Extensions
N.EntityFrameworkCore.Extensions copied to clipboard
Code cleanup and improvements
Not sure if you would like help with this but I saw some things that could be improved in the code and also structure it so it is easier to maintain and get into.
Creating this issue first before I do anything that you might not want any way.
Suggestions:
- [x] Add an .editorconfig file to enforce code standards in the solution
- [x] Run
dotnet format
after this and submit a PR with all fixes this produces
- [x] Run
- [ ] Since only Net 8 is targeted go over and use collection initializers where possible
- [ ] Use char methods where possible, like in CommonUtil.cs since this has better performance
- [ ] Use StringBuilder where possible for better performance and less allocations
- [ ] Order methods by their access level, so like public, internal, protected, private
- [ ] internal classes can be sealed, small performance boost
- [ ] Group overload methods together
- [ ] Remove code that is commented out
- [ ] In LinqExtensions instead of dictionary sqlExpressionTypes, a switch expression will be faster
- [ ] Look for similar improvements
- [ ] See if Spans can be used instead of other collections/strings
There is more but starts with this to see if you want help with this and if so how you would like to proceed since it might create lots of conflicts for some of the changes.