Otis wrote:
The base class implements IDisposable, there is no need to do that again in the derived class (you can't even in VB.NET), and there are no resources held in the generated code which justify IDisposable: everything is managed, so IDisposable is not needed.
Well, I tried EntityBase2 in a using block (w/ c#) and VS gave me a compile time error:
'SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2': type used in a using statement must be implicitly convertible to 'System.IDisposable'
I'd like to create multiple entity instances using the following:
using (MyEntity my = new MyEntity())
{
my.property = X
}
using (MyEntity my = new MyEntity())
{
my.property = y
}
using (MyEntity my = new MyEntity())
{
my.property = z
}
The using block has the advantage that I can copy and paste the block over and over, simply changing the property values. (For my specific case, I need to init persistent storage with a set of system entities)