Example #1
0
 public bool ModificarPerfil(Perfil Perfil)
 {
     using (SQLContexto contexto = new SQLContexto())
     {
         PerfilRepo perfilRepo = new PerfilRepo(contexto);
         return(perfilRepo.Actualizar(Perfil));
     }
 }
Example #2
0
 public List <Perfil> TraerPerfiles()
 {
     using (SQLContexto contexto = new SQLContexto())
     {
         PerfilRepo perfilRepo = new PerfilRepo(contexto);
         return(perfilRepo.TraerTodo());
     }
 }
Example #3
0
 public bool EliminarPerfil(string Codigo)
 {
     using (SQLContexto contexto = new SQLContexto())
     {
         PerfilRepo perfilRepo = new PerfilRepo(contexto);
         return(perfilRepo.Eliminar(new Perfil {
             Codigo = new Guid(Codigo)
         }));
     }
 }
Example #4
0
        public bool AgregarPerfil(Perfil Perfil)
        {
            Perfil.Codigo = Guid.NewGuid();

            using (SQLContexto contexto = new SQLContexto())
            {
                PerfilRepo perfilRepo = new PerfilRepo(contexto);
                return(perfilRepo.Insertar(Perfil));
            }
        }
Example #5
0
 public Perfil TraerPerfil(string Codigo)
 {
     using (SQLContexto contexto = new SQLContexto())
     {
         PerfilRepo perfilRepo = new PerfilRepo(contexto);
         return(perfilRepo.Traer(new Perfil {
             Codigo = new Guid(Codigo)
         }));
     }
 }