with the new version 3.0, can i use Substage and the old-fashion config settings or i move to use only T4 templates ?
Thanks in advance,
Giuseppe.
You don't need Substage anymore or the old config settings (apart from a connection string of course) because the t4 templates do the code gen for you.
Have a look at the docs for a quickstart video:
http://subsonicproject.com/docs/Main_Page
Related
This might be a dumb question, but I just integrated Subsonic to an ASP.NET 4.0 WebForms project and while the dll reference was added, I don't see the T4 templates anywhere.
I think that the T4 templates are not required if you're using the SimpleRepository approach, but I don't really see the sense in making Subsonic a NuGet package if you're not getting the T4 templates with it. I'd think it'd be rather more logical if the Subsonic NuGet package installed the T4 templates and the user just removes them if he doesn't need them, rather than having to download the T4 templates separately even though you installed Subsonic through NuGet.
Does anyone know anything about this?
I wanted to add them in but the problem is (according to David Ebbo) that the reference drops right into the /bin folder. The T4s, however, need to go into the root somewhere because you need to add the code to the project.
I know it's an inconvenience - but there was no manifesting system (not sure if there is one now) to use that would say "push this into the root".
If it changes, I'll update the package :).
Some time back, I created two separate SharePoint projects in VS 2008; one using STSDEV, the other using VSeWSS 3.0. I want both of these projects to be created with VS extensions, but how can I tell them apart? The project files look very similar...
Inside the .csproj file (or .vbproj, heaven-forbid) you'll find a <ProjectGuids> tag or something very similar. Their should be a guid in that element unique to each project type.
-Oisin
Output in both seems to be the same so the simple answer seems to be re-create both in VSeWSS 1.3
Can T4 templates be used in a web site project?
Or more specifically, can Subsonic be used in a web site project?
I can run the .tt files in a web application project but it does not nothing on a web site project. I guess they need a solution/project environment in order to run?
The easiest way to do this is to add a class library project to your solution and then have SubSonic do it's generation inside that. You can then reference the class library from your website project.
Edit To clarify you'll need an app.config in the library project with your connectionstring for gernation and you'll need a connectionstring in your web.config for runtime database connection
I believe they need a project to run. I blame it on microsoft.... so perhaps adding a lib project would work. Don't know if the runtime connection string should go in the web.config or the dll's config, though.
I was wondering--what part of Subsonic 3 needs to be modified to support a different database under a Simple Repository scenario? I haven't found any documentation on this point. Subsonic 3 seems to be all about the T4 templates but when I check out the Subsonic project sources I don't see any T4 templates in there...so where/how do I add support for another database?
Thanks,
Alex
no part of SubSonic needs to be modified for SimpleRepo - just change your connection string and be sure to change the provider (part of the connection string) as well. So, the default connection might be:
connectionString="server=localhost;database=northwind;user id=bob;password=*****" provider="System.Data.SqlClient"
Change that to be the connection string you want, and the provider to your DB provider. MySQL would be something like "MySql.Data.MySqlClient" and SQLite would "System.Data.SQLite" (I think).
SubSonic will do the rest.
I have a small code base using Subsonic 2.1 in my project. I would like to start using Subsonic 3.0 as soon as possible. But I don't currently have resources to convert the 2.1 implementation. Is it possible to start using 3.0 for new code and leave the 2.1 code running. Will I have any special conflicts. Anything I should watch for?
I'm pretty sure you can't do this. There would be too many conflicts with the naming of the namespaces and classes.
Very similar question asked a couple of days ago at
use subsonic 2.x and 3.x in the same project
No, you can't run them side by side. Depending on what you're using (ActiveRecord/RepositoryRecord and Query/SqlQuery) migration difficulty will vary. If you're using RepositoryRecord and only SqlQuery queries the migration to the LinqTemplates is not that complicated.