Entity framework join to ms-access - visual-studio-2010

I want to ask you is any way to generate or updating access database from entity framework, I have a serious problem I have a database using ms-access and it is expensive for me if I want to change to sql server ?
I need to use entity framework functionality. could you give me a solution ?

If you want to use MSAccess don't use EF. If you want use EF, don't use MSAccess.
Entity Framework does not support Access. But you can migrate to SQL Express (at no cost) and use EF for your applications.
SQL Express is free and enought for small databases.
Alternatively, if you want a desktop database, you can use SQLite. NET driver for sqlite supports EF.

Related

How to generate model classes for existing oracle database in asp core 2.2?

I'm trying to make database first approach in asp core 2.2.
My problem is that I can't find anything helpful to generate my model classes from my existing oracle database, I want to do it by anyway I don't care, but all my attempts failed so any help would be much appreciated
Edit 1:
I see that EF Core is always mentioned in the answer but it has no provider, I'm not sticking to it I'm really asking for any approach to do what I want so if there is a way with Dapper, NHibernate or anything else I will be happy to use it as it get the job done.
Edit 2:
I tried Devart.Data.Oracle.EFCore, it generates classes based on database tables like a charm but it's paid unfortunately. later I used Dapper and had to create classes on my own.
Seems like Oracle is currently conducting a private beta of their EF Core provider. You could either try to join the beta or keep waiting for the release of the public beta, which is announced for Dec., 2018 (seems to be delayed).
A documentation about reverse-engineering yor db can be found here.
There are several tools in the market
Devart's Entity Developer
Scaffold-DbContext or dotnet ef dbcontext scaffold
EF Core Power Tools
Edit
Right now, Oracle does not have support for Entity Framework Core. Which means you need to use third party library in order to use Entity Framework Core with Oracle.
Devart has dotConnect for Oracle Database Driver (adapter) which supports EF Core.
Please see this link for Future Plans about Oracle Database Providers
Edit: OP Stated that Only Mapping/Scaffolding will be enough
You may consider to use Entity Framework to scaffold your model and migrate it to EF Core Manually.You may need little tweaks since two framework has some differences.
Try using this provider https://github.com/CrazyJson/Citms.EntityFrameworkCore.Oracle
You can download it from NuGet-solution - Citms.EntityFrameworkCore.Oracle
Make sure you've installed its dependencies:
Oracle.ManagedDataAccess.Core (>= 2.18.3)
Microsoft.EntityFrameworkCore.Relational (>= 2.2.0)
For anyone who is coming in later, this was finally solved by oracle itself as they released their provider for EF core Oracle.EntityFrameworkCore.
Then follow the docs but use Oracle.EntityFrameworkCore and the proper connection string

Couldn't find the Oracle Data source in visual studio 2012 while adding the ado.net Entity Model

This is my first time with MVC. When I am trying to add an ADO.net entity model then while creating a new connection I couldn't see my oracle database in the list of data source name. Only different type of Microsoft server is listed. What should I do to get the oracle database listed there too. When using simple database connection in the desktop application I could see the oracle database listed but not in this case.
The main problem is I couldn't connect entity data model to oracle database
I think you need to install the Oracle Developer Tools, which is a surprisingly complicated process.
This is a rather old article, but I think this is still useful
http://blogs.msdn.com/b/kaevans/archive/2009/07/18/connecting-to-oracle-from-visual-studio.aspx

Create copies of Oracle database tables in an SQLite database

I have 2 databases, Oracle and SQlite. And I want to create exact copies of some of the Oracle tables in SQLite in one of my applications. Most of these tables contains more than 10,000 rows so copying each table by going through each row programmatically is not efficient. Also the table structure may change in the future so I want to achieve this using a generic way without hard-coding the SQL statements. Is there a any way to do this?
p.s. - This application is being developed using Qt framework. All the queries and databases are represented by QtSql module objects.
Can't help with Qt framework, but for large amounts of data is is usually better to use bulk-copy operations.
Export data from Oracle
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/impexp.htm#BCEGAFAB
Import data into SQLite
http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles
IHTH
What you probably really want to use is the Oracle Database Mobile Server, which can automatically synchronize a SQLite and an Oracle Database.
The recent release of the Oracle Database Mobile Server (formally called Oracle Database Lite Mobile Server) supports synchronization between an Oracle Database and a SQLite or a Berkeley DB database running on the client. It supports both synchronous and asynchronous data exchange, as well as secure communications between client and server. You can configure the Mobile Server to synchronize based on several options without the need to modify the application that is accessing the database.
You can also find an excellent discussion forum for questions from developers and implementers using the Mobile Server.

how to write database independent layer using Linq

How I can write database independent, data layer using Linq to Sql? For example I have one dbml file, which I can use with almost any database at runtime ( by specifying web.config)
Entity framwork is a better option, but it is not implemented in Mono so I can't use it.
Edit: I mean different databases like Sql Server, Mysql or SqlLite. I prefer to use DbLinq for other databases.
Edit 2 :
I have created Linq to Sql mapping class by following this blog post.
http://blogs.msdn.com/b/spike/archive/2010/01/08/how-to-use-linq-to-sql-without-using-the-designer-generated-classes.aspx
Now how I can use this with other databases.
You need a 3rd party linq provider like ALinq http://www.alinq.org/ that suports Mono.
As it is structured from Microsoft, Linq to SQL is VERY database dependent, ie it only works with MS SQL. I believe that ALinq does work on mono. Here's a better list of 3rd party providers:
http://blog.linqexchange.com/index.php/links-to-linq-providers/

What is an Oracle Client?

I'm from MySQL background and am new to Oracle. I want to know
What is meant by Oracle Client?
What is its use?
What is its equivalent in MySQL ?
Thanks
What is meant by Oracle Client?
and
What is its use?
In this context, a client is a class library (DLL) that allows you to connect remotely to the underlying database of an application. A client, always within the same context, can also be called a .NET Data Provider.
You may have multiple data providers based on the underlying database engine with which you're working.
There was System.Data.OracleClient (deprecated), provided by Microsoft.
There is Oracle.Data.Client, which is actually the best ever built Oracle Client, or Oracle .NET Data Provider. You may also download the latest Oracle 11g Data Provider for .NET.
So, when accessing the Oracle underlying database, make sure your work with this provider, proper for your version of Oracle, and start doing ADO.NET with your favorite database! =P
There are also some other tools that you can work with that will ease your data access code pain, such as Enterprise Library or NHibernate, both are frameworks to basically accessing databases.
Enterprise Library can do even more then that!
And NHibernate is an ORM (Object/Relation Mapping) tool that can work just very fine with Oracle.
Remember though, always use Oracle.Data.Client namespace in the Oracle.DataAccess.dll assembly.
What is its equivalent in MySQL ?
As the equivalence for MySQL, I guess it would be MySQL Connector/NET.
It is the Oracle binaries installed that allow communication with the Oracle database. It can be using SQL*Plus, JDBC (type II or IV) or OCI (Oracle Call Interface).
Its a piece of software that allows a remote computer to talk to Oracle. If you were to write a piece of software that communicated with the database, you would use the Oracle Client to facilitate that communication

Resources