convert Microsoft .NET Pet Shop 3.0 into vb.net problem

G

Guest

I have download the Enterprise Sample(Microsoft .Net Pet Shop 3.0, which
source code is written in CSharp) from the web, and try to convert it into
VB.Net code.

I have done with the 'IDAL' and 'Model' projects, and now is working on
'DALFactory' project. I have add a 'IDAL' reference in the 'DALFactory'
project. But, when I write the 'Public Shared Function Create() As
PetShop.IDAL.IAccount'.
I get the error msg "Type 'PetShop.IDAL.IAccount' is not defined."

Why is this happen?

Thanks.


Following is my Account.vb code in project 'DALFactory'
----------------------------------------------------------------
Imports System
Imports System.Reflection
Imports System.Configuration

Namespace PetShop.DALFactory

' <summary>
' Factory implementaion for the Account DAL object
' </summary>
Public Class Account
Public Shared Function Create() As PetShop.IDAL.IAccount
'/ Look up the DAL implementation we should be using
Dim path As String =
System.Configuration.ConfigurationSettings.AppSettings("WebDAL")
Dim className As String = path + ".Account"

' Using the evidence given in the config file load the
appropriate assembly and class
ReturnCType(Assembly.Load(path).CreateInstance(className),
PetShop.IDAL.IAccount)
End Function
End Class
End Namespace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top