Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("IdMaterial,MaterialName,MaterialType,QuantityMaterialInStock")] Material material)
        {
            if (ModelState.IsValid)
            {
                _context.Add(material);
                await _context.SaveChangesAsync();

                _cachedService.RefreshMaterials();
                return(RedirectToAction(nameof(Index)));
            }
            return(View(material));
        }