Calling Stored Procedure from Silverlight using Linq...

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
RajeevDebnath
Posts: 14
Joined: Mon 07 Feb 2011 09:02

Calling Stored Procedure from Silverlight using Linq...

Post by RajeevDebnath » Mon 28 Mar 2011 07:45

Hi,

Currently I need to call stored procedure with two parameter(number and varchar) from oracle database using linq in silverlight. Can you please suggest some sample or steps.


Thanks,
Rajeev

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 28 Mar 2011 14:15

At the moment, LinqConnect does not support Silverlight. We plan to implement such support, but cannot provide any timeframe for this. Also, you can vote for this feature at our UserVoice:
http://devart.uservoice.com/forums/80267-linqconnect

As an alternative, you can work with Entity Framework models in Silverlight applications. For example, you can use the approach described in the following walkthrough:
http://blogs.microsoft.co.il/blogs/burs ... ght-3.aspx

Feel free to contact us if you encounter any problems with this.

RajeevDebnath
Posts: 14
Joined: Mon 07 Feb 2011 09:02

Calling Stored Procedure from Silverlight using Linq...

Post by RajeevDebnath » Tue 29 Mar 2011 04:45

Thanks for the response.

Currently we are using dotConnect for Oracle and we are able to generate Entity Framework from oracle database with Tables, View and stored procedure as functions.

We are able to query from table and View from silverlight but don't know about stored procedure in silverlight.

Now we want to call the stored procedure which I have updated below

Code: Select all

        public ObjectResult> SP_GETLINEUPPHOTOS(Nullable nLINEUPID, global::System.String vBOOKNO)
        {
            ObjectParameter nLINEUPIDParameter;
            if (nLINEUPID.HasValue)
            {
                nLINEUPIDParameter = new ObjectParameter("NLINEUPID", nLINEUPID);
            }
            else
            {
                nLINEUPIDParameter = new ObjectParameter("NLINEUPID", typeof(global::System.Decimal));
            }
    
            ObjectParameter vBOOKNOParameter;
            if (vBOOKNO != null)
            {
                vBOOKNOParameter = new ObjectParameter("VBOOKNO", vBOOKNO);
            }
            else
            {
                vBOOKNOParameter = new ObjectParameter("VBOOKNO", typeof(global::System.String));
            }
    
            return base.ExecuteFunction>("SP_GETLINEUPPHOTOS", nLINEUPIDParameter, vBOOKNOParameter);
        }

Please assist us.

Thanks,
Rajeev

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

Post by AndreyR » Fri 01 Apr 2011 15:15

I have sent a sample project to the e-mail address that you have provided in your forum profile.

RajeevDebnath
Posts: 14
Joined: Mon 07 Feb 2011 09:02

Post by RajeevDebnath » Thu 18 Aug 2011 11:10

Hi AndreyR,

Apology for the late response.

I have seen the sample and it looks fine.

Currently, Our application access oracle database using ADO.NET Entity data model which is non-RIA service and your sample use RIA service.

It would be great help if you can provide a sample with ADO.NET Entity Data Model and WCF Service.

Awaiting for your reply.

Thanks,
Rajeev

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 23 Aug 2011 14:40

We will prepare you a test project in several days.

You can also follow one of standard tutorials, e.g.,
http://msdn.microsoft.com/en-us/library/cc197940.aspx
Please tell us if you encounter any problems with this.

Post Reply