Using Stored Procedure as basis for DataContext

Using Stored Procedure as basis for DataContext

Postby 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

Postby 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 ?
GlennBA
 
Posts: 21
Joined: Tue 02 Jun 2009 12:58

Postby 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

Postby 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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for Oracle