Assalam o Alakum,

As per my understanding of your scenario; you did pretty good and I would
just recommend on change and that is in your DataServices Layer;
DataServices layer should be a collection of two classes only.

   1. Data Class (containing virtual and implemented methods to execute
   operations (read (any object) write (any object) update (any object) )
   2. Transaction Controller ---- Implementing the Transaction management.

Any further questions are most welcome.



On Fri, Sep 26, 2008 at 11:14 AM, Guilherme Utrabo <[EMAIL PROTECTED]> wrote:

>
> 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?
>
>
>
>
> >
>


-- 
Oh Allah bestow us Thine blessings and bestow us with what is good for
us as we know nothing what is good for us and what is bad. It's thy
virtue to foresee and it's thy strength to protect us.
Oh Allah Help us to offer our prayers Regulary and bless all of us with your
blessings
Take Care & Allah Hafiz
Iftikhar Qamar

--~--~---------~--~----~------------~-------~--~----~
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
 <p><a href="http://feeds.feedburner.com/DotNetDevelopment";><img 
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&amp;fg=444444&amp;anim=1";
 height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---

Reply via email to