Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Entity Framework, Import Function Stored Procs & Data Services

Entity Framework, Import Function Stored Procs & Data Services

Scheduled Pinned Locked Moved .NET (Core and Framework)
databaselinqcomhelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Worried Brown Eyes
    wrote on last edited by
    #1

    Hi I'm hoping someone can point me in the right direction. I'm trying to use EF within a Data Service, returning data from a SQL stored procedure. I've successfully followed the quickstart here http://msdn.microsoft.com/en-us/library/dd728275.aspx[^] to get a basic service up & running against my own DB, rather than Northwind. I've found this article telling me how to expose stored procedures http://msdn.microsoft.com/en-us/data/gg699321.aspx[^], which creates the expected public ObjectResult entry in the model, but when my service tries to do the

    Quote:

    config.SetServiceOperationAccessRule("GetContact", ServiceOperationRights.AllRead);

    I get the error 'The given name 'GetContact' was not found in the service operations', even though I can see it as a public method in the object browser. I have also found this article http://msdn.microsoft.com/en-us/library/cc668788.aspx[^] saying that to be exposed as a service operation for the service, it must return viod, IQueryable, IEnumerable, priomitive type or an entity type in the model. How do I reconcile the latter requirement with the former ObjectResult way of doing things. My Google skills have failed me, so pointers to documentation will be welcome. Regards, Stewart

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups