I'm new to use Linq to SQL. I've read that the first step to use it - you need to create "The Object Model". It is simple for MS SQL databases. But I use SQLite and I havent't found tool to create it.
I've tried DbLinq and MONO but the first tool is too old and work only with .NET Framework 3.5 and the second tool doesn't have database add-in in windows version.
How to create this model in SQLite? Thanks.
LINQ to SQL does not work with SQLite out of the box, only SQL Server and SQL Server Compact. You must use DbLinq or maybe use Entity Framework instead (if you are brave - http://erikej.blogspot.dk/2014/11/using-sqlite-with-entity-framework-6.html )
Related
When I add an Oracle Database as a Data Source to my project, the automatically generated code in the TableAdapter section is uses System.Data.OracleDataAdapter which is obsolete.
Following the documentation explains that you should use the third party Oracle software (ODAC). Given that the code is autogenerated, I am confused.
Am I missing something here?
Possible Solutions:
I could use .NET 3.5 for my Data Access Layer
Ignore the warnings
Manually Create Table Adapters
Something I am missing?
The solution is to use Oracle Developer Tools for Visual Studios. Add the Data Source in the same way as before (except the form now looks different as a result of the newly installed add on).
There is a package in Oracle - dbms_sqltune_util0 which I want to make use of.
When I run
desc dbms_sqltune_util0;
i get the appropriate description.
But when I try to use the functions contained in this package it doesnt work. What does this mean? Should I get a license or something?
The query which I am trying to run is
select dbms_sqltune_util0.sqltext_to_sqlid('select 1 from dual') from dual;
You are trying to use an Oracle 12c package. Your tag says you are using an Oracle 11g database.
As far a I know there is no Express Edition of Oracle 12c yet so the answer is: Yes, you need a licence to use this package.
BTW: Even in Oracle 11g there is not every package available in every edition of the Oracle databases.
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'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
We are using an oracle database in a project. Most of the tables represents classes or objects in the application. The application currently doesn't have a substantial amount of documentation. I am using StarUML to make up some class diagrams and such for other developers on the project to increase their understanding of the overall project. Using the database tables as a starting guide, and then making modifications to the diagrams as needed would be the absolute easiest and quickest way to get these set up. Is there any free applications that could assist me in pulling the schema out of the Oracle database and create class diagrams from them? Currently, there are 98 "objects" or classes closely modeled in the database and to create these all in a modeling application from scratch would be very time consuming.
You don't say what your target language is.
You can use Hibernate to generate schemas from an object model and mapping.
Middlegen is a tool that can create Java classes from schemas. Maybe those will help.
A 1:1 object-to-table mapping isn't always the best way to do things. It's hardly object-oriented. I'd view it as a starting point only.
I looked (briefly) through the StarUML documentation and don't see any way to import a database definition, so I'm not sure how you do this, sorry.
If you can find a way to get the data into StarURL, you could use Oracle's free SQL Developer tool to get the table definitions out as DDL or XML.
I know that Microsoft's Visio tool (Pro & Enterprise editions) can read selected tables from your Oracle database and generate models from that, but it ain't cheap. I really like Allround Automation's PL/SQL Developer as a reasonably-priced IDE targeted at programmers (vs DBAs) and I know that will generate diagrams locally. But I'm not sure it can save the metadata in a form you could use in StarUML.
Good luck,
-- Stew
It's a shame you didn't bother to respond to replies to your own question. Or am I misunderstanding the standard practice here that people just give points and move on?