Subsonic and sp_help_job - subsonic

Is it possible for subsonic to access dbo.sp_help_job?

SubSonic is an ORM tool that also wraps SP's but does not generate code for system SP's and the project is open source so you can edit the code to your need

Related

SubSonic and SQL Azure

I wrote an e-commerce app and used SubSonic 2.2 to generate the Data-Access-Layer.
It works perfectly with Sql Server 2005 and 2008.
However I would like to add support for SQL Azure.
Does anyone know if the code generated by SubSonic 2.2 with work with SQL Azure?
Side note:
If there are big issues I may scrap the 2 yrs old Data-Access-Layer and use Telerik ORM.
thanks
I'm not that familiar with SQL Azure, but I understand it supports T-SQL. In that case, it shouldn't be too difficult to adapt SubSonic to it.
However, changing the template files will not be enough, you will need to modify the source project and rebuild it. I say this because the SubSonic dll contains references to the various ADO.Net providers it supports (Microsoft.Practices.EnterpriseLibrary.Data, MySql.Data, System.Data.SQLite, System.Data.SqlServerCe).
I would consider / strongly advise using something like EntityFramework which is fully supported. Other fully support ORMs include Lightspeed, nHibernate etc.

How do I use SimpleRepository without the migration approach?

I am evaluating SubSonic for use in Phase 2 of a large project. This is an ASP.NET project, with 700 tables in a SQL Server database.
We are planning for our domain model to consist of POCO classes to assist with an offline access requirements we have. I believe that the SimpleRepository pattern would be among my best options.
Since I have a database already, however, the migration assistance doesn't help me. Are there T4 templates for SimpleRepository that I just overlooked? How do I 'turn off' migration? If I missed something in the Wiki, point me there, otherwise get me started and I'll write up a Wiki entry for y'all when we get there.
I'd suggest you look at the linq templates. They're generated from your database just like the ActiveRecord templates but give you POCOs instead.
Alternatively you can just use the simple templates and never run migrations, migrations only happen when you explicitly tell them to (by specifying SimpleRepositoryOptions.RunMigrations while creating your repository) so it's not so much that you need to turn them off, just don't turn them on.

Subsonic Question, is it possible execute templates during runtime?

Before ask my question, i have to say that subsonic is wonderfull tool, i realy like it.
I have an application which is createg domain layer during the runtime itself. I mean It has got customizable entites and when the entity added or any entity schema changed my model layer compiled again in the runtime according to changed database.
I'm wondering that, is it possible to execute subsonic templates during the runtime or when the user changed enetity schema or add to new entity to the application can it automatically generate the model layer again ? or how to trigger the template during the runtime of Subsonic ?
Thank you
If you make some modifications to the templates you can use the TextTransform.exe command line tool to generate SubSonic classes as described in the following answer:
SubSonic ASP.NET MVC sample in Visual Web Developer Express
You could then automate the execution of the commandline when your user modifies the schema.

Sharepoint Code Generation Tool

our team is looking to use a code generation tool for the current sharepoint application we are working on. We want to be able to generate most of the stored procedures and business entities instead of having to write them from scratch. Any recommendation what is the best code generation tool to use with sharepoint projects. I am familiar with CodeSmith, but I wasn't sure if there are any better solutions out there for this.
Code generation is not really necessary for SharePoint, all the code is generated in the SharePoint .NET Libraries.
The formulation of your question implies quite serious misunderstandings about SharePoint and it's use of databases.
If you want to talk to a custom database through a generated Data Access Layer, I would say go for the ADO.NET Entity Framework (works with VS2008 SP1 and .NET 3.5 SP1 only though.
A custom solution would be LLBLGen Pro

schema changes and subsonic - VS 2008

I have been using subsonic and the issues i keep running into is with when i make schema changes, I have to recompile everything and at times subsonic does not recognise some of the schema changes.
Is there a better OR/M that i can use asp.net which is more efficient with working with schema changes
I never had any problems with class generation with SubSonic. Are you sure your schema is a good one? Do you follow the conventions? If some tables are not generated, you may be missing PKs, but if you look into the generated classes it will tell you (in a comment) that this is the case. That's all the advice that I can give based on the information provided by you. I still think it's not SubSonic that's the problem...
If you are using the BuildProvider there is known issues with that and you might have to edit the web.config sometimes for it to rebuild, you can also try using SubCommander (sonic.exe) to generate your classes for you.
You can also try NHibernate check out http://www.summerofnhibernate.com/
What Database are you using and what schema changes are not showing up. In my experience with SubSonic I have never had any schema changes not show up in the generated classes. The largest error that I have seen people make is to add a table to their database, run the SubCommander to generate their classes and then forget to include the generated class in their project.
The only other related issue I have seen people make is if you generate your classes in a seperate class and they are all generated in C# and the project that is using the classes is written in VB. VB can not read into a C# project so you first need to build your C# project to see the schema changes in your VB project. That is one of the limitations of VB.
I suggest LLBLGen PRO. It is not free but well worth the $$$. I have been using it for more that 4 years on both web and windows applications.

Resources