Solved

updating table in entity model

Posted on 2016-08-23
3
64 Views
Last Modified: 2016-08-23
I'm using ASP.NET MVC 5 and Entity Framework 6 database first model.

I’m using SQL Server database.

I have some sql server tables called the following:

Table1
Table2

I have an entity model called MyModel.edmx

If I change the name of my sql server tables to

Table1TestData
Table2TestData

and then I updated my model to uses these new models

I have these new model classes

Table1TestData.cs
Table2TestData.cs

In the c# code of my application I have a bunch of pages that were referencing the original model classes from my model.

Table1.cs
Table2.cs

So I need to go into my C# code and update all the items referencing Table1.cs and have them reference Table1TestData.cs

Is there a way to list all the pages that are referencing the old model classes?
So I can update them to reference to new model classes.
0
Comment
Question by:maqskywalker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 41767216
In Visual Studio main menu choose : Edit -> Find and Replace -> Find in Files, Then in the Find and Replace dialog box set the Find What textbox to the table name that needs to be replaced and select Entire Solution in the Look in combo box and then click Find All button. In the results window will show all the places it is in. Double clicking on one of the result will open that line in the code or you can use the replace option and have the editor replace them for you.
0
 
LVL 1

Author Closing Comment

by:maqskywalker
ID: 41767415
Thanks.
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 41767424
Not a problem maqskywalker, glad  to help.
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question