Beispiel #1
0
        public async Task <Rol> CrearRol(Rol rol)
        {
            try
            {
                _context.Add(rol);
                await _context.SaveChangesAsync();

                return(rol);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Beispiel #2
0
        public async Task <Usuario> GuardarUsuario(Usuario usuario)
        {
            try
            {
                _context.Add(usuario);
                await _context.SaveChangesAsync();

                return(usuario);
            }
            catch (Exception e)
            {
                throw e;
            }
        }