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
Related
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.
We are planning to upgrade our technology to VS 2010. But I wonder if the MVC 2.0 is working properly since it has many issues raised from software developer who used it please see here: http://aspnet.codeplex.com/releases/view/41742.I want to use MVC 1.0 in VS 2010 is it compatible?
Indeed as Robaticus said, MVC2 works well and you shouldn't be afraid to use it... but if you really want to stick with MVC 1.0, take the relevant MVC DLLs and copy them into a known lib folder, and then directly link your project to those. By doing this, you will be directly linking to the old MVC libraries which will still work just fine. Just don't link to any of the MVC 2.0 libraries that will undoubtedly be sitting in the Global Assembly Cache.
MVC 2 works great; I'm using it right now. There are some very slight changes to the signature of some framework components, but overall works great. Would recommend 2 because they have a lot of new features to take advantage of and make your life easier.
If you had to, MVC 1 and MVC 2 they give you the source code, which you can include and use in your project, so you are always covered there.
MVC 1 and MVC 2 are compiled in .NET 3.5 SP 1 version, so you may be able to use the MVC 1 DLL directly...
HTH.
Well I am new to this ORM stuff. We have to create a large project. I read about LINQ to SQL. will it be appropriate to use it in the project of high risk. i found no problem with it personally but the thing is that there will be no going back once started.So i need some feedback from the ORM gurus here at the MSDN. Will entity framework will be better? (I am in doubt about LINK to SQL because I have read and heard negative feedback here and there)
I will be using MVC2 as the framework. So please give the feedback about LINQ to SQL in this regard.
Q2) Also I am a fan of stored procedure as they are precomputed and fasten up the thing and I have never worked without them.I know that LINQ to SQL support stored procedures but will it be feasible to give up stored procedure seeing the beautiful data access layer generated with little effort as we are also in a need of rapid development.
Q3) If some changes to some fields required in the database in LINK to SQL how will the changes be accommodated in the data access layer.
When it comes to Linq-to-Sql vs Entity Framework, I strongly suggest to use Entity Framework. With the release of .NET 4.0 and VS2010, Microsoft added soooo much goodness in Entity Framework(EF) 4.0. Let me just mention a few points: POCO and NTier support (this means that you can have a separate library with your simple entity classes and of course EF will still be aware of them), Lazy Loading, Sql query optimizations...Also you can let EF to generate your entities (and you have the option modify the T4 generation template) or you can create them by hand if you need more control. Also, if you app will indeed be large, with EF 4, now you can separate your layers quite nicely(you can create your Mocks fo testing etc...). I'm not a web developer, so I cannot give you any hints on mvc2 on this matter.
q2-q3) - in EF you can have precompiled queries - IF you observer later on that query performance is not quite what you need. This will speed-up things quite a bit. If you plan to use EF and if you add a few changed to you database, you can easily update your model with a click.
I know I babbled too much on EF and not Linq to sql :), but hey...I believe this suits way better on your needs and you should definitely check it out for this project. Also, I don't know how much Microsoft will add features / invest in LinqToSql in the future.
Cheers,
ok precompiled queries that certainly is catching my attention.
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.
I'm new to Subsonic and I work primarily with Oracle databases. Can subsonic be used against an Oracle database and does it support the use of Oracle's ODP.NET data provider.
If yes, can you point me to a good example?
Thanks in advance.
Scott
Marve is a little misleading. Subsonic can be used with Oracle but SubSonic 2.x actually uses System.Data.OracleClient. Subsonic 3.0 does not have any .tt files for Oracle yet as no one has stepped forward to do it. I have been using Subsonic 2.2 with Oracle for months now and find that it works very well.
SubSonic does indeed work with Oracle. Go here for a sample configuration for SubSonic 2.x using ODP.NET or here to see a screencast on configuring SubSonic 3.
Scott,
Recently some developers have teamed-up to offer Oracle support (using Oracle's ODP.NET) for Subsonic 3.x, using the T4 Visual Studio template database provider system. Please search Github.com for Oracle/Subsonic, or my link, http://github.com/mabraham1/LINQ2Oracle
Also, I've posted the template provider on the SubsonicProject site, as follows:
subsonicproject.com/docs/File:OracleTemplateProviderExample.RAR
Please rename the RAR to ZIP once downloaded (had trouble uploading a ZIP file).
Hope this helps!
Mark