Jan 27, 2018 12:07 AM|bruce (sqlwork.com)|LINK
we are all confused because your thread is about partial views, your sample code is an ajax call, and your complaint is something to do with a database call not working.
there is no issue using ajax to call an MVC action to read/write to a database and update the pages html (with json or html from a partial). people do what your thread title implies all the time (some solutions are more elegant then others). if its not working,
you have a fundemential logic error. writing and reading a database is so trivial in an action, we assume you are having some trouble calling the action, or handling the actions result. we assume you don't understand ajax, because you have no code to process
the results in your sample ajax call.