That isn't how it works. A folder (in Solution Explorer) is just that, a folder. It has no "runtime" aspect and therefore doesn't change your code in any way. You could have all your source files in a single directory or scattered across 100s and the code compiles the same. Folders are there strictly to make it easier to group related files together. So, adding a new folder changes nothing about what is or is not available to your code.
You mentioned @using
which leads me to believe you're building an Razor page. This is equivalent to the C# using
statement which is used to import a namespace to the current source file so any related types in that namespace are available. A folder is not a namespace, as mentioned earlier. A namespace by itself doesn't have a runtime counterpart. All it does is contribute to the global name of whatever types are defined in it. If a namespace has no types then the namespace doesn't exist.
I suspect you're used to creating a folder and then adding a class to that folder. In that case the default IDE behavior is to create the class in a namespace that follows the <defaultprojectname>\<folder>
convention. Hence you can then have a @using
statement that references the namespace, not the folder. This is a convention and not always followed.
So, to fix your issue, you need to add at least 1 type to the folder you created. Then that type will, by default, have the namespace name WebCraft.Data
and then your @using
statement will find the namespace, not folder.