doetnet core - rest API + SQL server - possible to go not MVC (only controller?)

ساخت وبلاگ
چکیده : Vote count: 0 Am abit struggling here ... با عنوان : doetnet core - rest API + SQL server - possible to go not MVC (only controller?) بخوانید :

Vote count: 0

Am abit struggling here with doing proof of concepts in C# and dotnet core, i actually like dotnet core and wish i could implement my API Server in it ( api server that is doing jobs on a database ).

But one thing that really gets to me when developing in proof of concept where database changes all the time and code needs to get updated with ping pong to REST clients is that it seems i need to follow MVC structure ( or MxC as theres really no view ).

Isnt it possible to create a controller only so all my code including accessing my database ( i dont want to create a model firsti will hardcode the names first as things in POC fase changes constantly ) - then sometime in the end it can be converted into a MVC structure.

Abit similar to when im doing API's in python or node.js - you write you are free to write the code completely in the controller and can work directly with json deserialzation instead needing to maintain both models and controller.

If anyone got an example of doing all in controller towards a SQL server ( ex. api /GetAll - will perform "select * from dbo.allcars" and return that - only in the controller function i would be absolutely thankful.

(and im newbie dotnet core so sorry if im asking the obvious - but even though newbie i really dont want to conform to the MVC as it takes out development time here in the proof of concept phase )

asked 46 secs ago
MT drip

back soft...
ما را در سایت back soft دنبال می کنید

نویسنده : استخدام کار بازدید : 26 تاريخ : يکشنبه 24 تير 1397 ساعت: 16:29