Now that we have different project types here, let's move the corresponding folders inside that individual
project.
So first, we start with the data folder and this data folder with their track inside the data access.
Then let's remove this data folder from the bulk book web project.
Next, what we have is the Models folder.
Let's move that to the models project and remove this model's folder.
In fact, the utility project right now would be just create a class with the name of a city and this
will be a public static class.
That way, we don't have to create an object of this class, and here it will hold all the static details.
That's why I have named this as.
So this will be a place to store all the contents of our application.
So perfect.
This change looks good.
But when we move things to a different folder, if we examine our models here, you will notice that
we have a different namespace of namespace should now be multiple models.
I cannot work models folder here since the namespace is model set, so they will move this outside of
the models folder.
We've removed the Models folder as well.
And then the category.
Let me change that namespace to bulky book Dark Martos, I have copy this and do the same with the added
view model right here.
Perfect.
So now our models looks good.
Let's examine the data folder.
We just have the application deep context, but this should be bulk bulk guard data access.
Now we have errors here, but if we build that application, we will have many more errors here, so
we will have to solve all of them one by one.
Errors that you see inside the data access project is because on this project, we cannot have the new
package for entity framework.
For all that we have to do is press control attack here, and we have the option of installing Microsoft
Identity Framework or package.
Now, when I started the project, the version was seven, but I'll see when it's just released.
So before I do anything, let me right click on the book project and manage.
Then you'll get packages.
I will call and the Updates tab, select all packages and I will update them.
But in fact, all the packages have been updated to use artsy one with six.
Now let's get back to the application deep context and install the package.
Microsoft Identity Framework Core.
And this time, the local version is actually one.
Let me use that category is now in search of different projects.
If you do control it dark, it will ask you to act reference to the bulky booked models.
We will do that and I will remove this namespace because that is relevant for.
So get that data file looks good.
But what about migrations?
Of course, we can move on migrations folder inside the data access as well and delete this migration.
Once you do that, if you build a data access, you will see some more errors because migrations require
its packages.
You can see them right here.
So if you do contract on migration, it will ask you to install the relational package.
Let's find an install that.
Inside, both keep club if they examine the dependencies packages, we installed the tools package.
So let's just install that package and sequence over inside the data access.
So if you click manage new kit packages, search for the packages.
Here we have SQL Server.
Make sure to install the same version that you have across the solution here.
And we get an error here because I believe we need to update one of the existing package.
Let me see that.
Let's go to the end of the relational package that was installed as version five.
Let's uninstall that here.
And let's go to the Browse tab.
We can just search for tools right here.
So we have Microsoft that entity framework called Dart Tools and the package version looks good.
Let's have that.
Once that is added, let's and start the relational package as well.
And finally, I will install the sequel server package, so it will search for a sequel server and perfect,
that looks good.
Let's go back to the migration.
There are no added access, looks great.
Let's try to build that and make sure it completes successfully.
We have some error.
The goalkeeper quote that data that's not relevant.
The application to be context is now intact.
The people data access.
Let's do the same in the other migration.
With that, I believe everything should work with data access.
But the fact that completed successfully next project that we have is the models project.
Let's try to build that one.
And that also worked.
Lastly, we have the bulk book web project that let's rebuild that project to see all the areas that
we have with namespace.
So that will be quite a few errors because we have to change all the namespace from bulk book web data
and models to new namespace, which is multiple data access and models.
So if you do control dart an application deep context, it will ask you to add reference to multiple
data access.
All the errors will be pretty straightforward.
You will just have to add the using statement and the project references.
So let's try to solve them one by one.
It will add the U.S. statement for longer and added new model is inside, thank you booked by those
now, then the funds that you see here because yes, Admiral, if you try to click on them, it will
not take you to those files.
So getting to the edit in those files is tricky.
But these advocacy, Gmail or the views.
So we have to go to individual views and we just need to update the models on top here.
The category model is now inside pocket book that models that category now rather than making this change
in all the files.
What if you want to add this to our global using statement, then we should be able to solve all of
the error messages pretty easily.
So we can cut this from here.
Save it, and if you remember, I said we have a few import file that is responsible for global imports.
Here you see, previously we had both cable correct models.
Now, the new norm space that we want to use is bulky booked models.
If you save that and then if you go back to the create, you can see the errors are.
Because here when you add a using statement, it is added globally to all the views that you have inside
this directory.
So with that, if you put it the application again, you should not see all the errors that you are
seeing before The View's pretty simple, right?
But now you know how you import an important role.
Next, we have the program Garcia's file.
Where have to add some using statements here?
Let me do that.
Let's grow it down.
Establishment has its using statement and perfect looks good.
Let's build isolation.
Perfect.
All the projects are building now successfully.
Now changing these things was simple because you are just getting started.
If you were doing that in middle of the project, it could be a big task by itself.
But when you do this, make sure to pick one project at a time.
Like what we did is we first made sure that data access is up and running.
Next, we worked on models and finally, we fixed everything inside the bulky book project.
That is the approach that you should take when you are shuffling things around.
If you try to fix all the project at once, it might get very confusing and dirty down the road.
So with all of these changes and the application, everything should work as expected.
Let's go to our category here.
And perfect, I removed the previous category that were created that we can create a new category here
and add alerts and everything is working as expected.
So with this, we have restructured our project to use our entire architecture.