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*
- How is it best to handle communication between services? If Service1 has composite relation with Service2, how do I inject mock repositories for both of them?Gaui– Gaui2014-08-19 16:56:38 +00:00Commented Aug 19, 2014 at 16:56
- I created a RepositoryFactory that I inject into every provider, so they share repositories.Gaui– Gaui2014-08-20 16:00:43 +00:00Commented Aug 20, 2014 at 16:00
- "My main goal is to make it as easy as possible to switch to another data storage later on" - I have to ask the question, just how likely do you think this will be? I don't think I've ever had to change the data storage later on for any system. But if your aim is to separate concerns so that UI doesn't know about DB design then great.Rocklan– Rocklan2014-08-21 00:27:43 +00:00Commented Aug 21, 2014 at 0:27
- @LachlanB Well there are many old services that we would like to switch out later on. These are old WCF services that we need to use for now because of a complicated business logic required. Later on we would like to go entirely through the Web API, connect it straight to a database, set up a ORM and use that for easy data access. Move the business logic. That's why I structured it to use the repository layer, so it doesn't matter where the service gets it data, just from some repository / data storage. The goal was also to make it easily mockable and testable.Gaui– Gaui2014-08-21 09:54:03 +00:00Commented Aug 21, 2014 at 9:54
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