On Fri, Dec 30, 2011 at 9:41 AM, Christof Wollenhaupt
<[email protected]> wrote:
>>
>>  In that you are thinking in VFP engine terms instead of
>> ADO.net.
>>
>
> Using EF makes you think in terms of objects instead of ADO.NET. I'm not
> convinced that ADO.NET is the only way we should think of data in .NET.
-----------------

Alan said he had a hard time dealing with SQL Server.  My guess is
getting a db set up and populated just to start things off.

Tossing in syntax like :
var iNames = employees.Select<Employee, string>(r => r.name);

would only have made it more difficult.


Yet I agree using EF is a lot nicer then standard set up like:.
try
            {
                DataSet ds = new DataSet();
                SqlCommand command = new SqlCommand();
                SqlParameterCollection sqlParameters =
(SqlParameterCollection)command.Parameters;
                sqlParameters.AddWithValue("@lot", lot);
                sqlParameters.AddWithValue("@mprd", mprd);


                string strConn =
ConfigurationManager.ConnectionStrings["PhoenixCon"].ConnectionString.ToString();
                SqlConnection objConn = new SqlConnection(strConn);
                SqlDataAdapter da = new SqlDataAdapter();
                command.CommandText = "sp_SelCoaTableData";
                command.CommandType = CommandType.StoredProcedure;
                command.Connection = objConn;
                command.CommandTimeout = 6000;
                da.SelectCommand = command;
                objConn.Open();
                da.Fill(ds);
                return ds.Tables[0];
            }

Sure I would have had command prefilled  with these values ahead of
time but I just got here.
                command.CommandType = CommandType.StoredProcedure;
                command.Connection = objConn;
                command.CommandTimeout = 6000;
-- 
Stephen Russell

901.246-0159 cell

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMY+gReE=ab2uotk0i2cng9wvu+nsroqhap7s_nfnhxq...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to