I
ITistic
I've recently attempted converting a small VS 2005 ASP.NET Web Site
Project to a Web Application Project using Scott's blog post:
http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx
This seems to be the best documentation available currently. After
following all of the steps I've run into 1 problem. In the original
Web Site project there were a few classes which were part of their own
namespaces. Here's an example of one of these classes:
Namespace DAL
Public Class Delinquents
Public Shared Function GetByID(ByVal ID As Integer) As
BOL.Delinquent
Dim db As Database = DatabaseFactory.CreateDatabase("dbNoPropane"),
_
SelectCmd As DbCommand =
db.GetStoredProcCommand("usp_SelectDelinquentByID"), _
dr As IDataReader, _
MyD As New BOL.Delinquent
db.AddInParameter(SelectCmd, "delinquent_id", DbType.Int32, ID)
dr = db.ExecuteReader(SelectCmd)
If dr.Read Then PopulateDelinquent(dr, MyD)
SelectCmd.Dispose()
Return MyD
End Function
End Class
End Namespce
In my code we'd call these methods as follows:
MyD = DAL.Delinquents.GetByID(Value)
All of this works fine in the Web Site project. After converting to
the Web Application project per Scott's instructions none of these
namespaces seem to be recognized by my code. The files are all still
there, namespaces defined in them properly, etc. If I create a new
class and put it in one of these namespaces my code recognizes IT
fine, but it won't recognize the existing classes even though they are
semantically the same. Anyone have any idea why this is and how I can
fix this?
Your response and time is greatly appreciated.
Thanks!
Project to a Web Application Project using Scott's blog post:
http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx
This seems to be the best documentation available currently. After
following all of the steps I've run into 1 problem. In the original
Web Site project there were a few classes which were part of their own
namespaces. Here's an example of one of these classes:
Namespace DAL
Public Class Delinquents
Public Shared Function GetByID(ByVal ID As Integer) As
BOL.Delinquent
Dim db As Database = DatabaseFactory.CreateDatabase("dbNoPropane"),
_
SelectCmd As DbCommand =
db.GetStoredProcCommand("usp_SelectDelinquentByID"), _
dr As IDataReader, _
MyD As New BOL.Delinquent
db.AddInParameter(SelectCmd, "delinquent_id", DbType.Int32, ID)
dr = db.ExecuteReader(SelectCmd)
If dr.Read Then PopulateDelinquent(dr, MyD)
SelectCmd.Dispose()
Return MyD
End Function
End Class
End Namespce
In my code we'd call these methods as follows:
MyD = DAL.Delinquents.GetByID(Value)
All of this works fine in the Web Site project. After converting to
the Web Application project per Scott's instructions none of these
namespaces seem to be recognized by my code. The files are all still
there, namespaces defined in them properly, etc. If I create a new
class and put it in one of these namespaces my code recognizes IT
fine, but it won't recognize the existing classes even though they are
semantically the same. Anyone have any idea why this is and how I can
fix this?
Your response and time is greatly appreciated.
Thanks!