Closed pascalfossouo closed 4 years ago
Hi having the same problem with BookStore-Mvc-EfCore on SQL Server
Microsoft.Data.SqlClient.SqlException: 'Invalid column name
{ "ConnectionStrings": { "Default": "Server=(LocalDb)\MSSQLLocalDB;Database=BookStore;Trusted_Connection=True;MultipleActiveResultSets=true" },
I have another question : is it on the SQL Server the database "BookStore" suppose to create ? if yes I'm using SSMS to view all databases but is not there.
Hi @realLiangshiwei :
pretty much did what I saw on this https://www.youtube.com/watch?v=cJzyIFfAlp8&t=390s
ABP version : Don't how to check the ABP version. Just download the abp-samples-master
'Acme.BookStore.DbMigrator.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.6\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Acme.BookStore.DbMigrator.exe' (CoreCLR: clrhost): Loaded 'C:\Users\Owner\Documents\Projects\BookStore-Mvc-EfCore\src\Acme.BookStore.DbMigrator\bin\Debug\netcoreapp3.1\Acme.BookStore.DbMigrator.dll'. Symbols loaded.
'Acme.BookStore.DbMigrator.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.6\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Step into: Stepping over non-user code 'Acme.BookStore.DbMigrator.Program.
The program '[10356] Acme.BookStore.DbMigrator.exe' has exited with code -1 (0xffffffff).
Hi @realLiangshiwei Just let you know that my first comment is from mongoDB. Try it a couple time but not working and just want to know the reason just download the BookStore-Mvc-EfCore.
Try open PMC setting Acme.BookStore.DbMigrator
as the startup project and setting Acme.BookStore.EntityFrameworkCore.DbMigrations
as default project, then run add-migration upgrade_3_2_1
command
Hi @realLiangshiwei Just let you know that my first comment is from mongoDB. Try it a couple time but not working and just want to know the reason just download the BookStore-Mvc-EfCore.
Try
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
Thanks for your report, I will update these samples
Where can I found this ?
Configure
I mean you need to add the code to the module class.
Hi I added inside BookStoreDbMigratorModule like this.
Run the .DBMigrator and used the update-databse but I don't see the BookStore database on SQL Server
public class BookStoreDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure
Hi @realLiangshiwei re do all the step, but still not have my BookStore database on my SQL Server. run the .Web, have this error on my browser
I have updated all samples https://github.com/abpframework/abp-samples/pull/41 Please pull all changes.
Hi, I have this error when running the .DBMigrator
Unhandled exception. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.Identity.IdentityDataSeedContributor -> Volo.Abp.Identity.IdentityDataSeeder -> Castle.Proxies.IdentityUserManagerProxy.
"ConnectionStrings": { "Default": "mongodb://localhost:27017/BookStore" },