Hi,
I Search variuos examples abaout this, but i try write my program and reveived msg wrong 'could not found adaper' or EntityView2.
When is library in my project exist this class?
my code :
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Gestor.CollectionClasses;
using Gestor.DaoClasses;
using Gestor.EntityClasses;
using Gestor.FactoryClasses;
using Gestor.HelperClasses;
using Gestor.RelationClasses;
using Gestor.StoredProcedureCallerClasses;
namespace cl_dbGestor
{
public class clsusuario
{
public SusuarioEntity obj_susuario;
public int CodeRet;
public clsusuario()
{
obj_susuario = null;
CodeRet = 0;
}
public DataTable Consulta(int IDUsuario)
{
DataTable result = new DataTable();
SusuarioCollection usuario = new SusuarioCollection(new SusuarioEntityFactory());
adapter.FetchEntityCollection(usuario, null); // fetch all users <==== Wrong What is... using above namespace, i write all class the my project Gestor
EntityView2 <SusuarioEntity> owners = new EntityView2<SusuarioEntity>(
usuario, (usuarioFields.ID == IDUsuario));
return result;
//usuarioView = usuario.DefaultView;
/*
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(usuario, null);
}
DataTable ret_tabela = new DataTable();
IEntityFields2 campos = usuario.EntityFactoryToUse.CreateFields();
//collection.EntityFactoryToUse.CreateFields();
*/
// EntityView2 usuarioIDView = new EntityView2( usuario,(SusuarioFields.ID == IDUsuario), null );
// create projection of these customers of just the city and the customerid.
// for that, define 2 propertyprojectors, one for each field to project
/*
ArrayList propertyProjectors= new ArrayList();
propertyProjectors.Add( new EntityPropertyProjector( CustomerFields.City, "City" ) );
propertyProjectors.Add( new EntityPropertyProjector( CustomerFields.CustomerId, "CustomerID" ) );
// create the actual projection.
usuarioIDView.CreateProjection( propertyProjectors, projectionResults );
return projectionResults;
}
*/
}
}
}
Erros :
Error 1 The name 'adapter' does not exist in the current context F:\2008\publicinetpub\Estudos_Iniciados_SET2008\dbGestor\LLBLGen Pro Projects\Projetos\cl_dbGestor-rcp-software\clsusuario.cs 31 13 cl_dbGestor
other errror :
Error 1 The type or namespace name 'EntityView2' could not be found (are you missing a using directive or an assembly reference?) F:\2008\publicinetpub\Estudos_Iniciados_SET2008\dbGestor\LLBLGen Pro Projects\Projetos\cl_dbGestor-rcp-software\clsusuario.cs 31 13 cl_dbGestor
Thanks for you help.
sorry,my english is no good.