Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / April 2008

Tip: Looking for answers? Try searching our database.

Can one control de property names generated upon dragging from a D

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Dent - 25 Apr 2008 21:40 GMT
Hi,

I am using VS2008 and love to drag tables into the project so as to let the
wizard create classes for me to use in LINQ. However, most DB tables and
columns use the ALL_UPPERCASE_SEPARATED_BY_UNDERSCORES style which conflicts
with the usual programming style for properties WhichIsLikeThis.

Is there a way to control this? The generated file is not a good place
because it could be re-generated so???

Signature

Thanks in advance,

Juan Dent, M.Sc.

Wen Yuan Wang [MSFT] - 28 Apr 2008 08:56 GMT
Hello Juan,

According to your description, you want to rename the table/column in
LinqToSQL. Your current database is defined by
ALL_UPPERCASE_SEPARATED_BY_UNDERSCORES style, but this is not the
programming style you like, correct? Thereby, you want to rename them in
LinqToSQl. If I misunderstood anything here, please don't hesitate to
correct me.

The generated file is controlled by VS IDE. VS IDE will overwrite all the
changes in these files. We recommend you rename the table/column in
Designer Mode.
Please click the table/column in "Linq to SQL" Desinger.
You can rename table/column in "NAME' Property in properties Panel.

Hope this helps. Please try the above method and let me know if this is
what you need.
If there is anything unclear or you have any more concern, please feel free
to let us know. We are glad to assist you.

Have a great day,
Best regards,
Wen Yuan

Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my (L)manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Juan Dent - 28 Apr 2008 19:01 GMT
Thanks, but what happens if some table changes and I need to refresh the
corresponding file? Since it is a generated file, it looks lik I would loose
all my customizations - unless the information is stored elsewhere such as an
XML file. Is this feasible? If not, is there some way to avoid loosing the
customization in the names of classes and properties corresponding to tables
and colums?
Signature

Thanks in advance,

Juan Dent, M.Sc.

> Hello Juan,
>
[quoted text clipped - 43 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Wen Yuan Wang [MSFT] - 29 Apr 2008 08:09 GMT
Hello Juan,
Thanks for your reply.

The answer is depended on how you refresh the dbml file.

Name property of table which you changes in Linq Designer mode is stored in
.DBML file (which is well XML formatted file). VS IDE generates
.designer.cs according to this file. Thus, .designer.cs file will be
regenerated each time you makes any change on its .dbml file. However, VS
IDE doesn't regenerate .dbml file. All the change you make in this file
will be stored as XML format.

I'm not sure how you refresh the table in DBML file when some table changes
in underling database. As far as I know, there is no feature for us to
refresh table in LINQ designer mode. The way I know to refresh table is to
delete that table in Designer mode and drag-drop table from Server Explorer
again. In this way, name information will be lost after you delete table
from LINQ Designer. But this will not take effect on other tables in this
.dbml file. What we would have to do is to rename this table after you
drag-drop it from Server Explorer.

Hope this helps. Please feel free to let m know if you have any more
concern or there is anything unclear. We are glad to assist you.

Have a great day,
Best regards,
Wen Yuan

Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.