How can I learn Enterprise Library 4.0?

I am trying to learn a corporate library. I found this useful code example to retrieve data from an SQL database. But I tried to send data through a parameter. I also use the UPDATE, DELETE and SAVE methods. Can you give me a similar sample? I am using Enterprise Library 4.0.

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using Microsoft.Practices.EnterpriseLibrary.Common; using Microsoft.Practices.EnterpriseLibrary.Data; namespace WebApplicationForEnterpirires { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Database objdbase = DatabaseFactory.CreateDatabase("connectionString"); DataSet ds = objdbase.ExecuteDataSet(CommandType.StoredProcedure, "sp_GetProducts"); GridView1.DataSource = ds; GridView1.DataBind(); } } } 
+4
source share
4 answers

You can find these handy http://msdn.microsoft.com/en-us/magazine/cc188705.aspx http://msdn.microsoft.com/en-us/magazine/cc188702.aspx

and this → one << , which targets your situation directly (I think). Although I think you want to do this, pass the DbCommand object to your ExecuteDataSet method.

+6
source

Primarily. Go to the Microsoft Download Center to download Hand-on Labs . Hand-on Labs has everything you need in the sidebar (tutorial, sample code, exercises ... etc.). Just follow the instructions of each block. Then you can fully understand how to use the corporate library in just a few days.

+2
source

Also check out the new Developer's Guide . It includes sampels code in both C # and VB. Happy learning!

+2
source

Have you tried this . This gives an example of how you can use the corporate library. so that the DataSet passes the parameter.

+1
source

Source: https://habr.com/ru/post/1304661/


All Articles