Byte My Data

A personal collection of advice and solutions I've used.

About the author

Something about the author

Using SubSonic 3.0 in a VB.NET web application

SubSonic is A Super High-fidelity Batman Utility Belt that works up your Data Access (using Linq in 3.0), throws in some much-needed utility functions, and generally speeds along your dev cycle. (http://subsonicproject.com)

The SubSonic code is in C# and the examples say to drag the folder containing the DAL templates into your project. Now that's all fine and dandy for an example and if the project is in C# but what if it's in VB or you want to separate the DAL? The simple thing to do is:

  1. Add a new C# project to your existing solution.
  2. Place all the files in the Subsonic DAL template folder into the root project folder - don't put them in a sub-folder.
  3. Include only the *.ttinclude files into the project (leave the *.tt files excluded).
  4. Reference the SubSonic.Core.dll.
  5. Make your changes to the Web.config and Settings.ttinclude files.
  6. Delete the Default.aspx page (I didn't need it).
  7. Now include the *.tt files into the project and that should create the class files.
  8. Build this project only.
  9. Add a reference to this project in you VB.NET project.

And that's it, you're all set.


Tags:
Categories: ASP.NET | C# | Databases | VB.NET
Permalink | Comments (1) | Post RSSRSS comment feed

Comments

Brain Dumps Sri Lanka

Saturday, February 11, 2012 11:32 AM

Brain Dumps

This article is very good. The topic is very nice and it says some interesting and existing news.

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading