2
Vote

The name 'CastDBNull' does not exist in the current context

description

internal sealed class GetSTUDENTBySTU_IdFactory : ISimpleDomainObjectFactory<STUDENT>
 
 
For every int column that is not null it generates for example
 
sTUDENT.STU_Id = CastDBNull.To<Int32>(db.GetParameterValue(command, "STU_Id"), 0);
 
 
 
sTUDENT.STU_Id = (Int32)(db.GetParameterValue(command, "STU_Id")); should solve this issue.

comments

raedh wrote Mar 30, 2009 at 1:05 PM

I had the same issue, I download the repository source code 'RepositoryFactorySource-18936' the CastDbNull.cs was in Microsoft.Practices.Repository project folder but not included the Visual Studio project I included the file and rebuild and use the new version of Microsoft.Practices.Repository and its worked fine now

wrote Feb 14, 2013 at 2:27 AM