Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

updating table in entity model

Posted on 2016-08-23
3
Medium Priority
?
74 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 64

Accepted Solution

by:
Fernando Soto earned 2000 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 64

Expert Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

715 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