How to generate database class files with SubSonic 3? - activerecord

I've been using SubSonic (ActiveRecord) for a couple of years. I've been waiting until a few of the bugs in 3.0 were fixed before downloading the newest release and upgrading my few sites that use SubSonic to 3.0. I'm currently using 2.2 on these sites. I'm working on a new site and wanted to use 3.0 to get a grip on the new updates before going back and updating my existing sites to 3.0.
However, I'm stuck and the old SubSonic site with forums and useful help documents seemed to have all changed and there's nothing there that I can find to answer my basic questions.
How can I generate database class files with SubSonic 3?
In version 2.x, I used the SubCommander tool integrated with Visual Studio and it just took a click of a menu choice to regenerate all of the class files. Now, there's just a single binary .dll file and no information on how to actually generate my class files.
This question is posed for a new database and new web site, but I have several other existing web sites/databases that I'd like to upgrade. Is there a document on how to transition from SubSonic 2 to SubSonic 3? Preferably, a document that takes into consideration existing implementations.

There isn't a document on transitioning from 2 to 3 although I think it'd be a great thing for someone to write. However you should find answers on how to get started from the docs site.
In particular it sounds like you should have a look at:
The 5 minute ActiveRecord demo
Using SubSonic 3 ActiveRecord
ActiveRecord overview
This question should also have answers to some of the pitfalls when get started with SubSonic 3 and t4.

Related

Upgrading MVC 3 to MVC 6 What is the best way

I am planning to upgrade MVC3 EF5 project to MVC6. I understand it will require a lot of manual changes all over in config files, project files, entity framework, etc. Before I spend hours, wanted to see what is the best way?
Option 1: to make changes in IDs, configures, assemblies, etc. in the existing project (it doesn't even open in VS2015 right now, like any other MVC3 project, Thank You Microsoft). Looking at the instructions for converting MVC3 to MVC4/5, I guess I will need to have an ambulance on the standby here :-) It amazes me that MS did not provide any tool or even clear instructions to help developers.
Option 2: Create a brand new project in VS2015, then add new controllers with the same name as found in the old projects, then copy and paste controller implementations. Views and non-controller classes should work without much changes (only change I can think of is that new versions of dependencies in imports may be incompatible and will need to be dealt with manually, but this would be the same in Option 1). Not sure how to deal with entity framework. Perhaps if I recreate the entity model from database again, it should generate a compatible code. But then there are probably about 100 stored procedure function imports. I guess I will need to create function imports manually one by one (Question here, will the existing function imports remain intact if Option 1 is followed? Is there a way to copy function imports from the old project?).
Sorry, I know this is a rather convoluted question. Just trying to solicit inputs from others who may have done this in the past. I understand both Option 1 and 2 will require hours of work.

MVC3 with Npgsql and Entity Framework and .Net Framework 4

Well I would like to know if NpgSQL supports .NET framework 4 with EntityFramework, as I tried to use it with framework 4 and Microsoft.Data.Entity.CTP (code first approach) in my MVC3 application and I found no success unfortunately.
Also if any one could lead me to any posts or links on using ADO.NET in MVC3 instead of EntiyFramework would be really helpful.
Any help would be really appreciated.
Out of box no. There is some workaround with PostgreSQL and EF, but I gave up after many attempts to force it to work. I use Telerik OpenAccess ORM. For PostgreSQL is free because database is also free. It's work with every major RDBMS. Support for Code first approach, and also database first approach (reverse enginering). In last version there is also Perfomance and tuning tool! Excellent product.
Here is link
When you asked the question I think the answer would have been no. The answer is probably irrelevant to you now but for others ...
Now I would have to say the answer is yes. I have a MVC3 (then upconverted to MVC4) project that uses code first entity framework and npgsql.
I used EF6b2 and npgsql 2.0.12.
Setting the web.config entityframework section, DbProviderFactories section and connectionstring correctly was the part the got it working. I also included the security and npgsql dlls in the project.
See
https://stackoverflow.com/a/12033304/25372

Any open source projects using to Linq2SQl?

Is there any open source projects or demo projects using Linq2Sql as primary data layer for accessing and updating all its data?
I am working in a project(asp.net webapp) which has Linq2Sql in DAL. We realized that half way through the project our design is not properly working out. I would like to see how Linq2Sql is being implemented in multilayered project. Any reference or guidance would would be good to.
I am already aware that Entity Framework is preferred way going forward but this project is mostly done in Linq2Sql, so we would like to finish it out.
a year ago, when I tried asp.net MVC I used nerd dinner to learn it, if I remember correctly, it's using linq2sql

what are the advantages of MVC3 over MVC2

i am currently learning MVC2. actually working on my first MVC2 project.As the MVC3 beta is launched and available to download. please suggest me should i use MVC3(Beta) or continue with MVC2 and second thing is, if i move to MVC3 then what major advantages i will get from it.
My project is an ERP application.
Please suggest me what should i do.
Thanks
I suggest you take a look at this blog post from Scott Gu :
http://weblogs.asp.net/scottgu/archive/2010/11/09/announcing-the-asp-net-mvc-3-release-candidate.aspx
To name some advantages, you can use the Razor View Engine, which depending on your requirements, it will make your view code nicer. I believe that's the case for an ERP System.
This is not 100% mvc3 related, but with the RC you get NuGet installed with it, if you're planning on using external libraries to help you out, that's a great way to manage them.
Partial Page output caching is a great feature for systems that share bits and pieces across different ui's.
Unobtrusive JavaScript and Validation is also another great new feature that will help you keep your code's maintainability among other benefits.
MVC3 also has some benefits from the dynamic aspects of .NET 4, and that also helps you keep your view code cleaner.
And my end point would be, MVC3 is already on RC stage....it already has Go Live license and support...if you're learning, I would suggest learning the latest, you will get all the knowledge you need to use mvc 1 and 2, and also the new things about mvc 3.
One factor is the release date of MVC 3 compared to the release date of your application, i.e. you should not ship an application based on a beta version of MVC.
If you switch to MVC 3 beta, you should be aware that there may be changes in the final release, so you may have to make changes for each version until the relase, and your application is only guaranteed to work with one specific pre-release version, until the final release of MVC 3.

Is Linq to NHibernate in the 2.1 Alpha release?

So the nHibernate 2.1 Alpha came out a few days ago, but the announcement on sourceforge doesn't mention the additional features. In particular, it doesn't mention whether LINQ is included. I know that I've read that LINQ would be part of 2.1, but that was 6 months ago. Anybody know if LINQ is in 2.1 or what new features are? There's no documenation about 2.1 alpha features on the official site.
LinqToNHibernate is being written by Steve Strong at IMeta. Steve is attempting an amazing task by changing the way NHibernate parses HQL from the string based system to an abstract syntax tree. To be fair he does have a head start as this is being done in Hibernate using ANTLR which he is porting to .Net. It still baffles my mind what he is undertaking. I must say well done to IMeta for giving Steve the time to work on this.
If you want to see how far he is going you can check the uNhAddIns repository.
There is also a workable LinqToNHibernate provider which you'll find in NHContrib I am using this on a few projects and it works well but isn't in active development now and does break down if you attempt complex Linq queries

Resources