public async Task <IActionResult> Create([Bind("Id,Nombre,Apellido,Telefono,Email,Imagen")] Empleado empleado) { if (ModelState.IsValid) { _context.Add(empleado); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(empleado)); }
public async Task <IActionResult> Create([Bind("name,id")] Departments departments) { if (ModelState.IsValid) { _context.Add(departments); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(departments)); }
public async Task <IActionResult> Create([Bind("Id,Nombre,Abreviatura")] Departamento departamento) { if (ModelState.IsValid) { _context.Add(departamento); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(departamento)); }
public async Task <IActionResult> Create([Bind("Id,Nombre,Direccion,CIF,Pais")] Empresa empresa) { if (ModelState.IsValid) { _context.Add(empresa); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(empresa)); }