Hi,
I want to simply the design for some of my controllers and use the Repository directly from controller.
Is there an example snippet anyone can provide?
Many thanks in advance.
Best Regards, Vikas
7 Answer(s)
-
0
Inject it, like anywhere else.
https://aspnetboilerplate.com/Pages/Documents/Dependency-Injection
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks @aaron.
I was able to make it work.
Does the Application Service expose the services as API? Coding directly in contoller would mean no api for that operation?
Regads, Vikas
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
What do you mean no API?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
@aaron: What I mean is that any methods that as written as ApplicationService in Projectname.Application project seems to be available as an API.
If any database operation methods are written elsewhere, they won't be availabe as API?
Just want to verify my understanding.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Application Service and Controller methods expose HTTP API, if that's what you mean.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thank you.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Closing ticket
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)