[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Modify asp.net web site classes based on SQL Table definition

Posted on 2013-01-22
4
Medium Priority
?
201 Views
Last Modified: 2013-02-05
Hello EE, big question for you.

I have a web site in my company in .NET with C#.

the site is architectured with BLL, DAL, SqlClient classes and so forth.

Not all employees knows .NET and let's say we add a column to a SQL table, let's say table A, well we need to go change at at least 2-3 places like the class Customer (that has get set Properties, the sqlClient parameters for the update and insert statements, the CustomerDetails DataReader ...


Is there a way to create/recreate the customer.cs (get set properties) based on the SQL table definition ? That way no one would need to get modify it would help me so much.

same thing for the other classes... any ideas on that ?

I know there is a limit to do nothing...I dont mind to do changes if I want to lets say add a asp:Label from the new column thats ok to go manually add it in the Web Form page...

thanks.
0
Comment
Question by:PhilippeRenaud
[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
  • 2
4 Comments
 
LVL 41

Accepted Solution

by:
guru_sami earned 2000 total points
ID: 38807872
Model: When doing it in a classic ADO.NET way there isn't any easy route. If you are using Entity Framework or something similar, you might have a luck on updating the Model based on Database changes.

Queries: You surely need to update the queries. Now if you are using storedprocs then updating it won't need any  developer involvement.

View/UI: As you said, it has to be done unless you are using DataBound controls with auto-generated columns.
0
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 38810116
Maybe I could create a program thats goes write inside a .VB file like we do with .TXT files ?

I could generates new lines of .net codes without any programmor doing it has he would only give me the new column name of the table

i would generate automatically all new lines with something like StringBuilder then copy into the vb.net file ?

I dont need to compile since its not an application right ?
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 38812391
It depends where the changes are made. If by .vb you mean code-behind then for asp.net Website project it will be a dynamic compilation.
0
 
LVL 1

Author Closing Comment

by:PhilippeRenaud
ID: 38855961
thks for info
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 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