-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider ditching Activator.CreateInstance #5
Comments
Seems like a candidate for a pull request. |
I was thinking of something in regards to this. I believe we should switch this to use an Expression Tree instead of reflection. We'll get some great speed improvements out of it. I can look into it over the next few days and see what I can whip up |
skutnarSDS
added a commit
to skutnarSDS/EFCore-FluentStoredProcedure
that referenced
this issue
Feb 6, 2020
…r#25) - Added method ExecuteStoredProcAsync that takes params Action<SprocResults>[] - In MapToList: replaced usage of Activator.CreateInstance in MapToList with new T() (issue snickler#5) - In MapToList: tweaked string compares to follow better practices - Formatting - Fixes to XML documentation - Finor refactoring / readability fixes - Removed unused parameters from some methods: - WithSqlParam that takes SqlParameter - removed unused paramName - ExecuteStoredNonQuery - removed unused commandBehavior - ExecuteStoredNonQueryAsync - removed unused commandBehavior
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could ditch
Activator.CreateInstance
for a public default constructor constraint on type T. i.e:You could also cache the
props
for type T, to save callingGetRuntimeProperties
on every call you could grab them from the cache if they are there. Not sure how much that would save as I haven't checked to see ifGetRuntimeProperties
does caching of it's own.The text was updated successfully, but these errors were encountered: