Solved

updating table in entity model

Posted on 2016-08-23
3
56 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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

830 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