abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.88k stars 3.44k forks source link

mongodb project template #713

Closed dolphinsd closed 5 years ago

dolphinsd commented 5 years ago

When using https://abp.io/Templates to create mongodb based project, the project created with no mongodb database objects defined and does not run.

hikalkan commented 5 years ago

I've just tested and it's working properly. Are you trying the "application template", right?

hitaspdotnet commented 5 years ago

@hikalkan I thinks he's problem is about Test projects. They have referencing to EntityFramework which isn't existed. https://github.com/abpframework/abp/blob/49901a76397308e7acbdc9819cd63e33f18b3b4a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj#L10

hikalkan commented 5 years ago

Actually, the downloaded solution has no reference to these projects:

image

test folder is empty if you select mongodb. It's included in the zip file by mistake. Anyway, I created an issue to make tests working for mongodb too: https://github.com/abpframework/abp/issues/718

dolphinsd commented 5 years ago

@hikalkan I used https://abp.io/Templates to create a project. I just did again. See images attached and project, mvc version has object mappings. d6b0bc4032a3a85a4b71c762fd7ac767 Test.zip 9906986325011f53008df33cf2eb7e12

yekalkan commented 5 years ago

hi @dolphinsd

image

I've built your project. There is no warning or error. Am i missing something?

hikalkan commented 5 years ago

Could not reproduce

dolphinsd commented 5 years ago

@hikalkan , i did not see any mongo objects definitions, even it compiles, it does nothing as no objects are defined.

hikalkan commented 5 years ago

i did not see any mongo objects definitions

Didn't understand. What mongo objects? When you start the application, a seed data inserted to the database related to users, roles and permissions. Can't you see it (you can check with MongoDB Compass)?

devjaw commented 5 years ago

@hikalkan i just start the application and then tried to login with admin user but it's not working. i also checked the MongoDB Compass but there are no data. However, i registered as a new user in the application and it is working fine but without any roles.

yekalkan commented 5 years ago

@devjaw have you run *.DbMigrator project?

https://docs.abp.io/en/abp/latest/Getting-Started-AspNetCore-MVC-Template#using-the-dbmigrator-application

devjaw commented 5 years ago

@yekalkan it works now ! thank you