D
D
Dmitry Shnyrev2020-12-29 17:01:21
ASP.NET
Dmitry Shnyrev, 2020-12-29 17:01:21

Is it possible in ASP.NET to write your own custom console tools?

I'm trying to find a way to run console commands to execute some kind of logic in the context of an ASP.NET project.
Here, for example, is an analogue from Flask
https://flask.palletsprojects.com/en/1.1.x/cli/#cu...
Or another example is the same
dotnet ef database update ,
but I need, for example
, dotnet run my-super-custom -method-with-aspnet-context
or, more specifically, an example of what I want to see
dotnet run create-user-and-send-confirmation-email
Something I can't google for something similar.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2020-12-29
@vabka

You are describing the dotnet tool
dotnet run which of course you can't do as it's a built-in command

T
Timofey, 2020-12-29
@timofeygusevopal

Yes. https://docs.microsoft.com/en-us/dotnet/core/tools...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question