-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
ExecuteUpdate: Add SetProperty overload that accepts a value directly (no lambda) #28968
Comments
I would appreciate an answer. |
@aradalvand We try to be responsive to questions asked on GitHub, but that doesn't mean the team can jump onto questions immediately they are asked. The team have many other things to do beyond answering questions here, including having time for a healthy work-life balance. Other than complicating the API signature and requiring additional code for what seems like limited value, there may also be other reasons why this can't be implemented. We will discuss as a team in due course. |
I understand that, I wasn't "demanding" an answer or anything, typically issues on the EF Core repo are answered in a day or two in my experience so I thought maybe mine had gotten left out this time.
That doesn't make sense.
It requires additional code on your side while eliminating unnecessary code on the user's side; which is a common practice in good API design.
Okay, I'd be eager to hear those. |
We discussed this and the consensus was that this would be a good change. We are late in the game for 7.0, so it's more likely to go into 8.0 unless @roji finds some time locked away somewhere. |
Okay good to hear. |
I'm looking forward to this |
@zhuangState I explained why those aren't possible at the moment here. |
SetProperty
accept a value as its second argument instead of an expression?And make SetProperty accept a non-expression lambda directly Closes dotnet#28968
And make SetProperty accept a non-expression lambda directly Closes #28968
I originally asked this question here but couldn't get a response, so I figured maybe I should create an issue for it. It's about the new
ExecuteUpdate
feature.I noticed that the
SetProperty
method doesn't accept an actual value (a string literal, for example) as its second argument, only an expression, so you'd have to do:Instead of just:
Is there a particular reason behind this?! Why don't you just allow simple values?
The text was updated successfully, but these errors were encountered: