Results 1 to 2 of 2

Thread: Create new Table in DataBase

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2011
    Posts
    19

    Create new Table in DataBase

    Hi!
    Im using ASP.NET MVC2, and I have a database and an edmx file with entities and relationships.
    I would like to create a new table with its new entity, and i see I can create the table in the Database explorer, but not in the model explorer, so when I update the Model from the Database, nothing changes.
    Any advice? TIA

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Re: Create new Table in DataBase

    The only way I know is to call ExecuteStoreCommand on the ObjectContext object.
    Code:
    objectContext.ExecuteStoreCommand
    And I believe this code will only work in EntityFramework 4.0.

    http://msdn.microsoft.com/en-us/libr...recommand.aspx

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