public IActionResult AddMedicine([FromForm] AdminAddMedicineViewModel model) { if (!ModelState.IsValid) { return(BadRequest()); } //var userId = userManager.GetUserId(User); adminsService.AddMedicine(model.Name, model.Manufacturer, model.QuantityStock, model.ExpirationDate); return(Redirect(Url.Action("Medicine", "Admins"))); }