Upload Image in Asp.Net Core?

I Solved it. I understood i initial bad

_appEnvironment

in Constructor. With repeated edits, all of the codes in question are currently correct.

Thanks @Shyju user.


Here is how to upload an image in C# Asp.net core Web Application 2.1 MVC:

First I'm assuming you've created a model, added to db and now working in the controller.

I've created a Person model person model

For create get:

 //Get : Person Create
        public IActionResult Create()
        {
            return View();
        }

post Action (please see screen shot) create post action method

Finally the view Create View

Project Output: Here is the output of my project