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. LINQ
  4. Why bother with EF?

Why bother with EF?

Scheduled Pinned Locked Moved LINQ
csharpquestionwpfdatabasewcf
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.
  • S Offline
    S Offline
    Sevententh
    wrote on last edited by
    #1

    I've recently started a project and decided to use Entity Framework, but have come to grinding halt when it comes to updating an entity with a foreign key. After days of research, I've now discovered that EF doesn't support updating Parent-Child foreign key relationships. Using a simple example from NorthwindDB: The table Products has a foreign key to Suppliers (SupplierID). If I have a CRUD usercontrol for Products and a combobox list of Suppliers, how do you update a Product with the selected Supplier. Surely, this is a basic requirement of any application designing a CRUD application? Now, I understand that in .NET 4 this will be available. But how do I do this now! If this isn't possible, I'll have ditch EF and go back to using Datasets, which I was trying to avoid in this new project! Which asks another question, why use EF in any DB application? I'm a little desperate now :(( as my project is now 2 weeks late, so any further advice would be fantastic :confused: A little more info on my project: Server-Side: WCF Service with EF Client-Side: WPF Web Application using MVVM template

    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