?
Solved

ASP.net MVC 4 Razor and dynamic queries

Posted on 2013-06-29
4
Medium Priority
?
1,266 Views
Last Modified: 2013-06-29
Hello,

I outsourced a development project where the old developer left. The current project has been developed using ASP.net MVC 4 Razor.

One of the requirements is that the program is able to write a select query using relations scheme that is stored in a table (the relations are not on the schema because this is not necessary, there are only select statements used in this project). The table basically contains the following information: the first column contains the first table and column (table1.column1) and the second column contains the related table and column (table2.column2) the last column contains the relation type for example:
|PrimaryKeyTableColumn|ForeignKeyTableColumn|
|Sales.Customer               |Customer.No                 |

The new developer states this is not possible using ASP.net MVC 4 and Razor because it's bound to the Entity Framework. Is this true?
He wants to switch to ASP.net webforms, this means that all old code is pretty much useless.

Thanks in advance
0
Comment
Question by:vijgen
[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
4 Comments
 

Expert Comment

by:priyank_developer
ID: 39286519
What do you want exactly? Do you want to construct the queries at run time when particular view called? And what is your table structure? Do you have separate database in which only column and relational information is stored of other database? You question is quite confusing to me. But that's fine for me. Clear your question and we will move ahead. One thing is that nothing is impossible. There will be some other ways to achieve your goal. Thanks.
0
 

Author Comment

by:vijgen
ID: 39286560
Based on the data supplied (which can be different every time) the user on the frontend of the webapp should have the possibility to query his data (which can be stored in different tables). The join must be made dynamically based on the selection the user makes (the relations between this tables are defined in the table I've mentioned in the first question)
0
 
LVL 14

Accepted Solution

by:
binaryevo earned 1400 total points
ID: 39286620
That is false, the developer doesnt have to use entity framework.  Its a great tool but absolutely not a requirement.  It does give you cool scaffolding abilities though.  Your developer can query the database the same way as done in webforms its just not as "new school".  He can still use mvc forms and razor dont let him tell you he cant.
0
 
LVL 11

Assisted Solution

by:lenordiste
lenordiste earned 600 total points
ID: 39286664
ASP.net webforms was originally invented to help winforms developpers into writing web applications. ASP.NET MVC is definitely the way to go for most modern web applications so stick with it :-) !

Asp.NET MVC4 + Razor + EntityFramework is a solid combination.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Suggested Courses

764 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