Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2010, 12:15 AM
Registered User
 
Join Date: Jun 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default never have to customize the auto-generated code

Dear co-developers,
In chapter 2 -DAL there is a partial class that is named the same as the entity class and in the new C# code can have that inherit the correct interface so one need not change the dbml self generated code.
It seems this isn't possible in VB as it doesn't implicitly add the implements statements in the dbml designer code and ENTUserAccount class.
Can the Author or anyone tell us whether this approach as designed in this fine book will work in VB. If it is possible can you give some suggestions or code to get us VBers going?

I can't contact the Author as his email address is not given but his approach being so 'professional' must have a VB equivalent. The best idea so far is to code part of the DAL in C# as a separate project. Could someone explain which classes and code need to be in C#?
Thanks for your help, Markandeya
 
Old June 23rd, 2010, 03:09 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

What exactly are you asking? How to extend an Entity Framework class with a partial class in VB? That's possible. Assuming you have an entity called Blog, you can create the following partial Blog class and add the interface:

Code:
 
Partial Public Class Blog
   Implements ICanHasCheezburger
  ''' Implementation here
End Class
 
Public Interface ICanHasCheezburger
 Property CanHasCheezburger As Boolean
End Interface
Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
windows code generated siji44 Visual Studio 2005 1 September 11th, 2007 12:32 PM
auto generated mail id vijaypalada ASP.NET 1.0 and 1.1 Basics 2 January 20th, 2007 05:50 PM
Auto generated Details View nutrino ASP.NET 2.0 Basics 2 June 18th, 2006 06:15 AM
ASP and auto-generated primary keys Steve777 Classic ASP Professional 2 May 26th, 2005 10:47 AM
Chapt. 13 "Try It Out" - Auto-Generated Commands tullyf BOOK: Beginning ASP.NET 1.0 0 January 20th, 2004 02:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.