0

Basically people host/develop web api & web application separately. Is it best way to keep separate both, as we know, we can implement/use both Controller (Web MVC Controller & WebAPI Mvc Controller) in same project? I just want know about the which way is best & why ?

Please let me know because I am going to develop application using entity framework.

Kishor T
  • 300
  • 1
  • 4
  • 15

1 Answers1

0

Typically I use MVC controllers when I want to return a view / perform model binding etc, and web api when I'm writing more data centric crud type methods and returning json. Because of these differences I tend to keep the projects separate right now.

That being said, if you take a look at ASPNET Core they have basically merged the WebApi and ASPNET projects together and they now share the same code base and pipeline.

Soon your decision wont be cut and dry, you can pick and choose what pieces you want to use in the same project.

pforsthoff
  • 474
  • 1
  • 3
  • 15