473,468 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Entity Data Model and stored procedures

17 New Member
Hi.
My solution (working in VS 2008) has a C# console app, and a C# web service. The service has an entity data model. It has numerous stored procedures. For one of the stored procs, which just returns data (SELECT blah blah FROM...), I added a function import called "Iservice." I saved all, then in my console app, updated the service reference to my C# service. Now, in my console app, I am trying to do the following:

myEnts db = new myEnts(new Uri("http://localhost:3811/isr.svc");

foreach(st_service sr in db.Iservice(false))
Console.WriteLine("Number#: {0} " + sr.num);
This doesn't work. "Iservice" is the name of the function import I created and I can see it in the object explorer, but when I look at the service reference, I can't see it in the object explorer. The compiler doesn't like "db.Iservice(false)" and the message is that myEnts from the service reference does not containt a definition for "Iservice."

So when I am in the service project, and look at the object explorer, I can see Iservice - however when I look at the service reference in the object explorer, from the console project, I do not see Iservice. How come this happens? How can I fix this? I tried saving, closing, and reloading MSVS2008, I tried updating the service reference multiple times. I googled for examples of calling stored procs in the EDM, and tried different ways of calling it as shown here:
http://blogs.microsoft.co.il/blogs/g...framework.aspx

http://blogs.msdn.com/bags/archive/2...rocedures.aspx

http://blogs.msdn.com/adonet/archive...framework.aspx

I'd appreciate any help.


PS -- I mean object browser, not explorer, sorry. Also, the stored proc that I created a function import for takes in a BIT as a parameter. When in my service project, and looking at the object browser, it shows Iservice as "Iservice(bool?)" which is strange to me. Why the question mark?
Jun 2 '09 #1
0 3435

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
2
by: serge | last post by:
My project is to automate testing of Stored Procedures of type SELECT (at least for now). I want to create a table where each stored procedure's input parameter values are entered and in another...
2
by: Emily Jones | last post by:
That subject line will have Joe Celko apoplectic!! Let's say I have this thing. Oh, I don't know, a car. No, a vehicle. Can we agree that is an entity type? Some attributes might be VIN, Fuel,...
3
by: markaelkins | last post by:
I want to create a simple user interface to collect the following data and store the data in a SQL database…. Could someone please help me get started? Data to collect from user interface and...
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
by: Andy B | last post by:
I wanted to try out the ado.net entity framework model and see how it was different from linq to sql entities. I put a page in a web application project, added an ado.net entity model and told it...
3
by: chris.kennedy | last post by:
I am really struggling to create an entity which maps to 2 "base" entities. I have a customer and invoice entity which are based in tables in a one to many relationship. I have tried: 1....
1
by: markla | last post by:
Hi, I have an Entity data model built in Entity Framework, which sources data primarily from an MS SQL 2008 database, and sources some static (data dictionary) values from code-based objects. I...
3
by: Andy B | last post by:
I have about 12 services that will be used on the website I am working on. A few of them are News, Events, Venues (that work directly with Events), Mailing lists and some others. Each one of these...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.