//POST: /api/HistoricalLogin/Login public async Task <JsonResult> ReserveProducts(ProductsViewModel model) { var response = new JsonResultBody { Status = System.Net.HttpStatusCode.OK }; try { ProductsLogic _ProductsLogic = new ProductsLogic(); var user = await _userManager.FindByNameAsync(User.Identity.Name); await _ProductsLogic.ReserveProducts(model, user.Id); } catch (Exception ex) { response.Status = System.Net.HttpStatusCode.InternalServerError; response.Data = MensajesApplicacion.ErrorApplication.ToDescriptionString(); response.Errors.Add(ex.Message); } return(Json(response)); }