EF Core error

From Logic Wiki
Revision as of 13:50, 4 April 2017 by AliIybar (Talk | contribs)

Jump to: navigation, search


Problem

When I run Add-Migration or update-database commands in PM I get these errors.

Add-Migration : Exception calling "Substring" with "1" argument(s): "StartIndex cannot be less than zero.
Parameter name: startIndex"
At line:1 char:1
+ Add-Migration -Name 'Firstqa' -verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-Migration], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentOutOfRangeException,Add-Migration

Explanation

When the project structured like

  • .NET CORE
  • MySql (SapientGuardian)
  • StructureMap

Structuremap obviously try to auto fill an interface in a constructor in MySql EF code ..

It works and does the job but it also displays this error.