After doing
some googling no the forum I discovered that I should do something like …
public BasicFormORM()
:base()
{
InitializeComponent();
if(!this.DesignMode)
{
pemManager=PersistenceManager.DefaultManager;
enlEntity = new
EntityList<Entity>();
}
}
… but still this didnt work.
I have a base form ‘BasicFormORM()’ which provides some basic form services like…
private void
BasicFormORM_FormClosed(object sender, FormClosedEventArgs e)
{
try
{
thisEntity.RejectChanges();
}
catch
{
}
}
…all other forms inherit from this the base form
‘BasicFormORM()’ it is these child forms that
wont open the base form opens even if I don’t use if(!this.DesignMode).
After a bit of testing I confirmed that the problem is
occurring because of trying to access the persistence manager from the
constructor however using the DesignMode property to prevent this access is not
working
Also this problem only started after a formatted my pc
Thanks