无法将值NULL插入“Discriminator”列,不允许我创建用户

时间:2015-06-26 21:43:51

标签: c# html sql-server asp.net-mvc-5 ef-code-first

这是我的网络配置我不知道我哪里出错了可以有人请指导我正确的方向。提前谢谢

  <?xml version="1.0" encoding="utf-8"?>

        <configuration>

          <connectionStrings>
             <add name="DefaultConnection" 
           connectionString="Data Source=./;Initial Catalog=OmniDB1;Integrated Security=True" providerName="System.Data.SqlClient" />
        <add name="conn" connectionString="Data Source=./;Initial Catalog=OmniDB1;Integrated Security=True" providerName="System.Data.SqlClient" />
          </connectionStrings>
          <entityFramework>
            <!--<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
              <parameters>
                <parameter value="Data Source=./;Initial Catalog=OmniDB1;Integrated Security=True" />
              </parameters>
            </defaultConnectionFactory>-->
            <providers>
              <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
            </providers>
          </entityFramework>
        </configuration>

1 个答案:

答案 0 :(得分:0)

尝试将脚本放在所有html的底部。在我看来,点击绑定发生在页面上的元素之前。