Home > Software design >  DBContext fail No suitable constructor was found for entity type 'FolderNamespace'
DBContext fail No suitable constructor was found for entity type 'FolderNamespace'

Time:07-22

I have a large Project with an DBContext create with great EFCore PowerTool and mySql

On Debugging fails on load the EntitiesContext with

System.InvalidOperationException: "No suitable constructor was found for entity type 'FolderNamespace'. The following constructors had parameters that could not be bound to properties of the entity type: cannot bind 'directorySeparator', 'path' in 'FolderNamespace(char directorySeparator, string path)'."

But i haven't a Entity like 'FolderNamespace' ....

On create empty project with the same Database over EFCorePowerTool and Versions of Pomelo.EntityFrameworkCore.MySql it runns correct!

CodePudding user response:

I have found the answer !

on a partial class from MimeKit Mail i've forget the

  [NotMapped]
  public ImapClient IC { get; set; }

to ignore on Entity Model...

  • Related