People who code: we want your input. Take the Survey

New answers tagged

1

There is more than one way to skin a cat. Your question is asking how something is done, but it's hard to provide an accurate answer when there are many possible different approaches. I've decided to pick the most commonly used one to answer with. Keep in mind that this is not the only possible approach. Imagine we have an “IItemRepo” interface implemented ...


1

If you are looking at "repository" in the context of domain-driven-design or cqrs, you should probably familiarize yourself with the definition from Domain Driven Design: Tackling Complexity at the Heart of Software, by Eric Evans. He describes common lifecycle management patterns in chapter six. In summary: the REPOSITORY pattern provides an ...


2

Your questions are confusing. perhaps because your example is so lightweight IItemRepo { Item GetItem(id) List<Item> GetItemsByName(name) List<Item> GetItemsBySpecifedFiltersAndConditions(colour, weight, whatever) ... } Api { start() { //repo is initialised in startup for DI where required diContainer.Register<...


Top 50 recent answers are included