Replies: 1 comment 7 replies
-
When @JasonBock wrote the analyzer we discussed whether it should apply to all the base types that support stereotypes, and I thought it should. I know what you are talking about @ajj7060, as there is certainly work associated with adding dummy Certainly one answer would be to relax the analyzer. Another would be for the data portal (at least with a command type) to not require an explicit |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see this was discussed here: MarimerLLC/cslaforum#817
I like the idea of this analyzer generally, and I know we can fix it by changing the ctor to a standard method and adding attributes, but we have hundreds of command objects and we have enough warnings to deal with, so to update from 4 to 5 I ended up just turning it off completely.
All of our command usages follow this:
Its not clear to me what the benefits of changing the ctor to a method and using
DataPortal
to create the command instance are, and it adds an opportunity to do the wrong thing if the[RunLocal]
gets forgotten. I don't think we've ever encountered a need to actually hit the server to initialize a command just before we go to execute it.If the command doesn't require any parameters to execute, you're then forced to create an empty create method as well, again with a chance to forget
[RunLocal]
CriteriaBase already seems exempt and it has managed properties as well, so it doesn't seem like allowing ctors for commands should be any kind of technical issue.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions