Monday, February 4, 2019

Best Practices for ASP.NET Core Web API

Hello I'm building a RESTful API for the backend of a web application and have a quick question about design best practices. Is it bad practice to have more than one model associated with a controller? For instance, I have a model that represents the table I'm querying in my database and then another model (Created through linq queries such as joins, selects, etc.) that I'm using which is the one that I want to serve to the client. Therefore, if I follow this method I will always have one model that represents the table I am querying from and then another model that is the object that I actually want to expose through the API, is this a bad idea? Is there a better way to organize this? Any suggestions or assistance is greatly appreciated.

Best Practices for ASP.NET Core Web API Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team