public async Task <IActionResult> Create([Bind("Id,Codigo,Descricao,HoraInicio,HoraFim,InicioAlmoco,FimAlmoco")] Horario horarios)
        {
            if (ModelState.IsValid)
            {
                _context.Add(horarios);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(horarios));
        }
        public async Task <IActionResult> Create([Bind("Id,CodigoSetor,NomeSetor")] Setor setores)
        {
            if (ModelState.IsValid)
            {
                _context.Add(setores);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(setores));
        }
        public async Task RemoveAsync(int id)
        {
            try
            {
                var obj = await _context.Setores.FindAsync(id);

                _context.Setores.Remove(obj);
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateException e)
            {
                throw new ExcecaoDeIntegridade(e.Message);
            }
        }
 public async Task InsertAsync(Ponto ponto)
 {
     _context.Add(ponto);
     await _context.SaveChangesAsync();
 }
 public async Task InsertAsync(Funcionario obj)
 {
     _context.Add(obj);
     await _context.SaveChangesAsync();
 }