Andre Lopes
1 min readApr 16, 2020

--

Hi!

Very nice implementation :).

I like to have separated repositories because sometimes we have some database logic that are exclusive of one data type. Making it too generic can cause to add some unnecessary code for other repositories.

For resolving DI in the Service layer, what you can do is create an Extension Method to “inject” those services in the Service layer and call this method in the Startup.cs . Like this:

Don’t forget to ad the Microsoft.Extensions.DependencyInjection package to your BusinessServices.Core project.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Written by Andre Lopes

Full-stack developer @ Tesla | Public Speaker | AWS | Terraform | Serverless | Gamer | Eternal Geek 🤓

No responses yet

Write a response