Last post Jul 18, 2012 08:19 AM by mcinnes01
Jun 24, 2012 05:40 AM|mcinnes01|LINK
I am very new to asp.net and EF and am currently in the the process of building my first major MVC application. I have been working so far with a code first approach for the tables that the application will use to store data, however now I have come to the
part where I need to pull data in (on read only basis) from an Oracle database.
Is it possible and how can I go about interfacing with the Oracle tables, in the same way I would with the SQL tables that I have generated from a code first approach?
Also is it possible and can you give me an example how I can use linq and repository pattern that I use with my code first tables to interface with Oracle tables?
In the repository pattern I have create a generic class that you pass in an entity and it will give Get() GetByID() Delete() Update().
With the Oracle db I also need a way to make sure it is only used in a read only manner, ther Oracle database is governed by the HR systems Business rules engine and so to write back to it there is another method and the system I am building is going to
do this action in monthly imports.
Finally is it possible to create a sql table that is almost a combination of an Oracle table or part of an Oracle table and then some additional data. I will try to explain, if we have in the Oracle database a table called contracts, on this table there
is a unique AlphaNumeric Code field and a Description field. What I want to do is use these 2 fields to populate a sql table (and if changes are made to the Oracle table these be reflected in the SQL table) then add additional fields in the sql table like
Hours/Week, Weeks/Year etc.
I know there are a fair few questions here so any help addressing them would be much appreciated, also is there anything I need to install to get this functionality?
Jun 29, 2012 08:48 AM|mcinnes01|LINK
Has anyone used any of the Devart products such as
Entity Developer or
DotConnect to achieve anything like this?
And do you have any opinions on how they work or how they would fit in with my application as described above?
PS I user Repository Pattern, UnitOfWork and am also trying to implement IAuditable and IAuthorisable Repository as well as a business logic layer.
Jul 17, 2012 01:02 PM|AukI|LINK
If you are using EF Code first approach with database then you specify your connection in web.config file. It may solve your problem.
Jul 18, 2012 08:19 AM|mcinnes01|LINK
I have purchased devart DotConnect for Oracle developer edition, I planned a week to work out how to get this all working, and with a bit of fumbling around I managed to replicate all my patterns and connect the 2 data sources together in less than an hour!