Problem when updating...

Thread is closed for posting
2 posts, 0 answers
  1. Paul R.
    Paul R. avatar
    12 posts
    Member since:
    Apr 2010

    Posted 16 Jan 2012 Link to this post

    First time getting into ORM & I'm having an issue.

    Within my ORM project in my \data\ folder I have a rlinq file which contains many .cs files.  One of them is named Employee.cs

    When I do an update from the database & save changes I'm getting a new file created called Employee2.cs, which contains a number of definitions already defined within the original.

    Thanks for you help.

  2. Damyan Bogoev
    Damyan Bogoev avatar
    581 posts

    Posted 19 Jan 2012 Link to this post

    Hi Paul,

    It seems that the file is somehow cached in the project by Visual Studio. Could you please try to edit the csproj file manually by removing the Compile node for the Employee.cs?
    - Right-click the project in the solution and select "Unload Project";
    - Right-click on it again and select "Edit MyProject.csproj";
    - Try to remove Compile node for the Employee.cs file;
    - To open the project again, right click and select "Reload Project";

    If the project is under source control it is possible that the file is not checked out correctly and removed. Could you please try getting specific version of the files using the “Get Specific Version” command with "Overwrite writable files that are not checked out" and "Overwrite all files even if the local version matches the specified version" options checked. Later on check the file that should be removed out, delete the class from the visual designer and save the model.
    If the suggested approaches do not help, I should ask you to provide us with a sample project that shows the wrong behavior to investigate the cause for the problem further.
    I am looking forward to hearing from you.

    Kind regards,
    Damyan Bogoev
    the Telerik team

    SP1 for Q3’11 of Telerik OpenAccess ORM is available for download

Back to Top