English 中文(简体)
如何学习企业图书馆4.0?
原标题:How can I learn Enterprise Library 4.0?

我试图学习企业图书馆。 我发现这一有用的密码样本,可以从一个数据库获取数据。 但我试图通过一个参数发送数据。 I m还使用UPDATE、DELETE和SAVE方法。 你能给我一个类似的样本? Im利用企业图书馆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();
        }
    }
}
最佳回答

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

http://www.dotnetdrop.com/table- Value-para amounts-with- Enterprises-library-data-accesslication-block/"rel=“noretinger”>>one<<,直接针对您的情况(我想)。 虽然我认为你想要做些什么,但将德巴诺德的反对纳入你的外壳方法。

问题回答

首先。 访问微软下载中心:

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





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签