You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- was +1 other than "Be independent of the framework/db" There is more to db independence than being able to switch databases. It is also about being able to performance optimize your persistence when needed by making drastic structural changes. It is about being able to unit test the code that is interesting to unit test. And, also, about avoiding crappy code that is just a mirror of the DB. Other than that, the rest of the answer deserves 10 upvotesTheCatWhisperer– TheCatWhisperer2018-02-14 21:45:07 +00:00Commented Feb 14, 2018 at 21:45
- @TheCatWhisperer: I would think that the goal would be to avoid drastic structural changes at all costs. Otherwise, why bother with all this indirection? If you design your data access layer correctly, you can have your generic repository that's database independent, provide a way to tailor your SQL in those areas that need performance tuning (in a vendor-specific way, if necessary), and get the best of both worlds.Robert Harvey– Robert Harvey2018-02-14 21:56:25 +00:00Commented Feb 14, 2018 at 21:56
- Sorry, my comment was not clear. You wrote, in response to, "Be independent of the framework/db"..."The value of this requirement is debatable unless you know you're going to change frameworks later on."TheCatWhisperer– TheCatWhisperer2018-02-14 22:05:22 +00:00Commented Feb 14, 2018 at 22:05
- "in practice only SQL Server is used" I have to disagree with this statement as I know of a lot of work being done with EF+Postgres and EF+MySQL. And this is not only hobby projects. You are likely correct that most work is done with EF+SQL Server.Bent– Bent2018-02-14 22:12:23 +00:00Commented Feb 14, 2018 at 22:12
- @TheCatWhisperer: Yes, I understood what you meant. I stand by my statement that large-scale structural changes are something you want to avoid.Robert Harvey– Robert Harvey2018-02-14 23:06:44 +00:00Commented Feb 14, 2018 at 23:06
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cs