Hi there,
I am developing a mobile application that uses the DAO pattern.
But I think it's too much work to write the sql for every database
transaction on the software.
I'm using this architecture:
BusinessEntities
BusinessObjects (calls the dao layer)
DataServices (the dao layer*)
UserServices (the forms)
* Follow a method of the dao layer:
SqlCeConnection conn = new SqlCeConnection();
conn.ConnectionString = Resource1.Conn.ToString();
conn.Open();
string sql = "select * from Estatisticas";
SqlCeCommand cmd = new SqlCeCommand(sql, conn);
SqlCeDataReader reader = cmd.ExecuteReader();
DSMetas dsl = new DSMetas();
while (reader.Read())
{
dsl.Estatisticas.AddEstatisticasRow(Convert.ToDateTime(reader["DataInicial"]
), Convert.ToDateTime(reader["DataFinal"]),
Convert.ToDecimal(reader["MetaVis"]), Convert.ToDecimal(reader["RealVis"]),
Convert.ToDecimal(reader["ObjPerc"]), Convert.ToDecimal(reader["TolPerc"]));
}
return dsl;
I want something faster. I know I can use DataAdapters too, but I don't know
if it's the better way.
Someone could suggest me something?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---