In my case, the nullable field is a value type.
To restate your suggestion:
- Modify the generated code by adding a new partial class.
using DmDAL.EntityClasses;
using DmDAL;
namespace DmDAL
{
public partial class ShortMenuEntity
- Add this property to partial class:
public partial class ShortMenuEntity
{
public virtual object ParentIdNull
{
get
{
object valueToReturn = base.GetCurrentFieldValue((int)ShortMenuFieldIndex.ParentId);
return valueToReturn;
}
set { SetNewFieldValue((int)ShortMenuFieldIndex.TestName, value); }
}
}
I tried the above. During compilation an error was emitted:
Error 1 The type 'DmDAL.ShortMenuEntity' must be convertible to 'SD.LLBLGen.Pro.ORMSupportClasses.EntityBase' in order to use it as parameter 'TEntity' in the generic type or method 'SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase<TEntity>
Thank you for your help!