Solved

updating table in entity model

Posted on 2016-08-23
3
31 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 62

Accepted Solution

by:
Fernando Soto earned 500 total points
Comment Utility
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
Comment Utility
Thanks.
0
 
LVL 62

Expert Comment

by:Fernando Soto
Comment Utility
Not a problem maqskywalker, glad  to help.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now