Language preference:

Phase 1 / Connecting the Business Logic code with BLD

Once a DataContext class has been defined, it must be associated with a DataContextDescriptor object. The subclasses of PeterBlum.DES.DataAnnotations.Descriptors.BaseDataContextDescriptor know how to parse the DataContext to extract details about it, the Entity classes it hosts, and the DataFields of those Entity classes. This information, called the Descriptors, forms the backbone of BLD’s operations. BLD cannot operate without them.

Here is a typical registration. Your code goes in the Global.asax file.

<%Application Language="C#" %>
<%Import Namespace="System.ComponentModel.DataAnnotations" %>
<%Import Namespace="PeterBlum.DES.BLD" %>
<%Import Namespace="PeterBlum.DES.DataAnnotations.Descriptors" %>
<script runat="server">
void Application_Start(object sender, EventArgs e) { BLD_Application_Start.RegisterDataContext( typeof(PeterBlum.InitialEntities.NorthWindDataContext), // your DataContext type null, // replace with a RestrictionManager if user role security is needed PredefinedBLDRoute.IndividualActionFiles); // establishes URL Routing to the four Action Page Templates }
</script>

In the next topic, you will use the BLD Database Explorer application to see our initial application.