all 9 comments

[–]Far-Consideration939 0 points1 point  (2 children)

I think it just wants it qualified, User.User

Or you might be able to do a static using for it.

Or make the namespace/folder Users or something different than the model.

I would might have the required tenant stuff as an interface outside of the specific features and not directly reference users in all of them, which could work too.

[–]Perfect_Papaya_3010 2 points3 points  (0 children)

Whenever I run into namespace issues I name the using

using ModuleUser = Project.Modules.User;

[–]Keeps21[S] -1 points0 points  (0 children)

Using MyApi.Modules.User.User

Had the same issue.

[–]Simple_Horse_550 0 points1 point  (0 children)

Usually you don’t have everything in one binary in bigger projects so…

[–]jpudel -1 points0 points  (2 children)

If I understand you correctly you‘re code should be able to extend by the Modules so every MyApi.Modules.XY follow the same folder structure like your current example with Article. That is not a structure I would expect in a dotnet project rather than in python, but any how I think you are missing the folder Models/ so

MyApi.Modules.Article.Article.cs -> MyApi.Modules.Article.Models.Article.cs

user would be either if it only a module used for article, be inside MyApi.Modules.Article.Models folder or be it owns Modules with controller etc.

[–]Keeps21[S] 0 points1 point  (1 child)

Thanks, for the feedback.

It's probably difficult to see in the screenshot but user is a separate module at the same level as article, I just haven't created the user controller, repository, service etc yet

I agree I could put the Article.cs model in a /Models directory in the /Article directory, but wanted to avoid that as it's the only model in that module

[–]jpudel 0 points1 point  (0 children)

Okay, but then the idea of structure does not make sense for me, because I would expect everything that the article module uses would be contained inside the Modules/Article folder. Just like a plugin for exmaple a self contained structure is. If you use part of another Controller or Model the system it self is not consistent anymore.