Posted by ikaruga as ASP.NET, dashCommerce 3.0.1
All stored procedures included in the configuration file (Store/App.config) have an equivalent static method in: Store/Models/Generated/StoredProcedures.cs
When I was new to dashCommerce I didn’t figure this out right away.
If you created new stored procedures, you need to update this SubSonic-generated StoredProcedure class to include your new stored procedures. To do so, modify the configuration file, look for the “includeProcedureList” attribute. Add the names of your new stored procedures in the list. Notice this line:
stripSPText=”dashCommerce_Store_”
I’m not sure if it will still work fine if your stored procedure’s name doesn’t have that prefix.
stripSPText value: string default: [Empty] A comma-seperated list of values that should be stripped from stored procedure names when generating classes. The strip operation is performed using Regex.Replace(), so basic Regular Expression syntax is supported ~subsonicproject.com
When you’re done with the configuration file, run the SubSonic DAL. Then each of the newly included stored procedures should now have a function like the following in the StoredProcedures.cs:
/// <summary>
/// Creates an object wrapper for the dashCommerce_Store_EmailExists Procedure
/// </summary>
public static StoredProcedure EmailExists(string Email)
{
SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure(”dashCommerce_Store_EmailExists”, DataService.GetInstance(”dashCommerceProvider”));sp.Command.AddParameter(”@Email”, Email, DbType.String);
return sp;
}
Of course you can also do it manually, as what I’ve been doing before I discovered the “official way” of doing it. Just be careful not to overwrite this file with the one generated by SubSonic as it won’t include your manual edits.
Tags: asp .net tutorial
.Net asp .net tutorial asp .net tutorial c# sample code CSS sample script database guide java sample code javascript sample code mssql sample script string reverse in C# t-sql telerik sample code user-defined function vb .net sample code visual studio tutorial
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.
RSS feed for comments on this post · TrackBack URI
Leave a reply