Using Stored Procedure as basis for DataContext

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
GlennBA
Posts: 21
Joined: Tue 02 Jun 2009 12:58

Using Stored Procedure as basis for DataContext

Post by GlennBA » Tue 02 Jun 2009 18:40

All tables in my database are completely surrounded by sprocs.
The users have no access to the tables other than sprocs.
I know how to do Insert, Update and Delete using sprocs, but how do I do select ?

My goal is to use all the methods in DataContext for change management, etc.

I have created a Linq to SQL datacontext while I was logged into Oracle as schema owner.
This method in DataContext creates a "select xx from table" which is not allowed.
public Devart.Data.Linq.Table Kurveregs
{
get
{
return this.GetTable();
}
}
My idea is to change this method so it calls a sproc that returns a Kurvereg.
The return type here is but the return type from
the sproc is System.Data.Linq.ISingleResult

How can this be done?

GlennBA
Posts: 21
Joined: Tue 02 Jun 2009 12:58

Post by GlennBA » Thu 04 Jun 2009 09:49

Hi!

Refrasing the question

In my DataContext I have this:
public Devart.Data.Linq.Table Kurveregs
{
get
{
return this.GetTable();
}
}

Is there a way to select from a stored procedure instead ?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 04 Jun 2009 11:39

Such functionality is not available at the moment.
We will investigate the possibility of adding such functionality, I will let you know about the results of our investigation.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 05 Jun 2009 10:49

There is no possibility to override this method.
I recommend you to call the stored procedure returning the set of entites instead of writing LINQ to SQL select queries.

Post Reply