Web Rest API: Post

I’ve made a rest API and a frontend page that can currently only request items from an XML file and display them on the fronted page (GET operation) ​ Next step is to make a form, submit the form with Ajax and POST it to the API. ​ Frontend ajax POST operation $(“#formCars”).submit(function (event) { […]

Whats the difference between awaiting a Task vs. returning without awaiting it?

public async Task<Customer> GetCustomer() { return await _db.GetCustomer(); } vs public Task<Customer> GetCustomer() { return _db.GetCustomer(); } Whats the difference between the two and is there any performance impact? The code is from a service which acts as an intermediary between the Repository and Controller. submitted by /u/nummer31 [link] [comments]