GithubHelp home page GithubHelp logo

tdykstra / contosouniversityefcore Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 7.09 MB

VS2015 EF MVC Core tutorials, plus code results of following the VS2017 tutorials, one branch for each tutorial stage.

C# 65.61% CSS 0.55% JavaScript 0.03% HTML 33.82%

contosouniversityefcore's People

Contributors

tdykstra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

contosouniversityefcore's Issues

Error in the ContosoUniversityEFCore tutorial

Hi,

I followed this very educational tutorial: Creating a complex data model - EF Core with ASP.NET Core MVC tutorial (5 of 10).
https://docs.microsoft.com/et-ee/aspnet/core/data/ef-mvc/complex-data-model

After running the command "dotnet ef database update" at CLI, I am getting an error: "There is already an object named 'Course' in the database", (see below).

The app is working until then, but when I want to change column attributes as described in paragraph "The Column attribute", I am getting an error form browser: :SqlException: Invalid column name 'FirstName'. System.Data.SqlClient.SqlCommand+<>c.b__107_0(Task result).

I would like to learn more. Thanks in advance!

CLI Error Description:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\User\Documents\visual studio 2017\Projects\ContosoUniversity\ContosoUni
versity>dotnet ef database update

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:07.21
System.Data.SqlClient.SqlException: There is already an object named 'Course' in the database.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSou rce1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String
methodName)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(I
RelationalConnection connection, String executeMethod, IReadOnlyDictionary2 par ameterValues, Boolean closeConnection) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNo nQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor
.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connecti
on)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String
targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateD
atabase(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c_
_DisplayClass0_1.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execu
te(Action action)
ClientConnectionId:b1bd24a3-87e2-4d93-b1c1-006b37c31f53
Error Number:2714,State:6,Class:16
There is already an object named 'Course' in the database.
-----------------------------------------------------------------------------**

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.