Results 1 to 13 of 13

Thread: .Net Entity Framework

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    .Net Entity Framework

    Ok so i'm spending some time with the Entity framework and wondered how you guys structure your projects at the moment it seem I have to generate and instance of the Database entity everytime I wish to do somthing,

    Code:
           
     ExtLib.DBEntities db = new ExtLib.DedimiEntities();
            ExtLib.Products newProduct = new ExtLib.Products();
            newProduct.Name = "Test Product";
            db.AddToProducts(newProduct);
            db.SaveChanges();
    Is this the best way to do this? Rather than have "ExtLib.DBEntities db = new ExtLib.DBEntities();" in every function?
    Last edited by Pino; Sep 25th, 2009 at 02:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width