public async Task<ActionResult> Edit(int id, EmployeeInfo emp) { HttpResponseMessage responseMessage = await client.PutAsJsonAsync(url + "/" + id, emp); if (responseMessage.IsSuccessStatusCode) { return RedirectToAction("Index"); } return RedirectToAction("Error"); }
public async Task<ActionResult> Create(EmployeeInfo emp) { HttpResponseMessage responseMessage = await client.PostAsJsonAsync(url, emp); if (responseMessage.IsSuccessStatusCode) { return RedirectToAction("Index"); } return RedirectToAction("Error"); }